Thread: [Pydev-users] [Users] problems with rdflib
Brought to you by:
fabioz
From: SourceForge.net <no...@so...> - 2011-12-06 10:47:51
|
The following forum message was posted by willemmerson at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4866331: I can't get rdflib to work in pydev. I can import rdflib but not rdflib.graph which is needed to run the examples. It works fine from IDLE or command line. Also, I tried another library (PIL) in pydev and that worked fine. I've tried expanding the egg file in site-packages, doesn't work. I'm using latest version of everything. Any ideas? |
From: SourceForge.net <no...@so...> - 2011-12-06 10:55:59
|
The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4866331: Which error are you having exactly (i.e.: is it only in code-analysis or are you getting an error when you run? Can you give details on it?) It'd also be nice if you could post the PYTHONPATH you have (both from the command line and from within Eclipse): import sys print('\n'.join(sorted(sys.path))) Cheers, Fabio |
From: SourceForge.net <no...@so...> - 2011-12-06 11:16:31
|
The following forum message was posted by willemmerson at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4866331: Hi, the code I am trying to execute is: [code]from rdflib.graph import Graph[/code] The error I get is: [code]Traceback (most recent call last): File "D:\Dropbox\workspace\pyNLG\src\rdflib.py", line 15, in <module> from rdflib.graph import Graph File "D:\Dropbox\workspace\pyNLG\src\rdflib.py", line 15, in <module> from rdflib.graph import Graph ImportError: No module named graph [/code] The pythonpath in eclipse is: [code]C:\Windows\system32\python27.zip D:\Dropbox\workspace\pyNLG D:\Dropbox\workspace\pyNLG\src D:\Dropbox\workspace\pyNLG\src D:\Python27\Lib\site-packages\rdflib D:\python27 D:\python27\DLLs D:\python27\lib D:\python27\lib\lib-tk D:\python27\lib\plat-win D:\python27\lib\site-packages D:\python27\lib\site-packages\pil-1.1.7-py2.7-win32.egg D:\python27\lib\site-packages\pyparsing-1.5.6-py2.7-win32.egg D:\python27\lib\site-packages\rdfextras-0.1-py2.7.egg D:\python27\lib\site-packages\simplejson-2.2.1-py2.7.egg D:\python27\lib\site-packages\sparqlwrapper-1.4.2-py2.7.egg [/code] The pythonpath from commandline is: [code]C:\Windows\system32\python27.zip D:\python27 D:\python27\DLLs D:\python27\lib D:\python27\lib\lib-tk D:\python27\lib\plat-win D:\python27\lib\site-packages D:\python27\lib\site-packages\pil-1.1.7-py2.7-win32.egg D:\python27\lib\site-packages\pyparsing-1.5.6-py2.7-win32.egg D:\python27\lib\site-packages\rdfextras-0.1-py2.7.egg D:\python27\lib\site-packages\simplejson-2.2.1-py2.7.egg D:\python27\lib\site-packages\sparqlwrapper-1.4.2-py2.7.egg[/code] |
From: SourceForge.net <no...@so...> - 2011-12-06 11:38:04
|
The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4866331: The problem is that your main module is called 'rdflib' (so, when you import rdflib you're importing your module and not the one in the system). So, renaming D:\Dropbox\workspace\pyNLG\src\rdflib.py to something else (i.e.: D:\Dropbox\workspace\pyNLG\src\rdflib_test.py) should make it work properly in your system. Cheers, Fabio |
From: SourceForge.net <no...@so...> - 2011-12-06 11:47:44
|
The following forum message was posted by willemmerson at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4866331: Oh dear. I feel very stupid. Thanks! |
From: W C. T. <cra...@gm...> - 2011-12-06 13:01:52
|
You could also try: from rdflib import Graph Which is what the library maintainer intended you to do, since they already imported all of the important classes into rdflib.__init__.py. - Craig - On 12/06/2011 06:16 AM, SourceForge.net wrote: > The following forum message was posted by willemmerson at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4866331: > > Hi, the code I am trying to execute is: > > [code]from rdflib.graph import Graph[/code] > > The error I get is: > > [code]Traceback (most recent call last): > File "D:\Dropbox\workspace\pyNLG\src\rdflib.py", line 15, in <module> > from rdflib.graph import Graph > File "D:\Dropbox\workspace\pyNLG\src\rdflib.py", line 15, in <module> > from rdflib.graph import Graph > ImportError: No module named graph > [/code] > > The pythonpath in eclipse is: > > [code]C:\Windows\system32\python27.zip > D:\Dropbox\workspace\pyNLG > D:\Dropbox\workspace\pyNLG\src > D:\Dropbox\workspace\pyNLG\src > D:\Python27\Lib\site-packages\rdflib > D:\python27 > D:\python27\DLLs > D:\python27\lib > D:\python27\lib\lib-tk > D:\python27\lib\plat-win > D:\python27\lib\site-packages > D:\python27\lib\site-packages\pil-1.1.7-py2.7-win32.egg > D:\python27\lib\site-packages\pyparsing-1.5.6-py2.7-win32.egg > D:\python27\lib\site-packages\rdfextras-0.1-py2.7.egg > D:\python27\lib\site-packages\simplejson-2.2.1-py2.7.egg > D:\python27\lib\site-packages\sparqlwrapper-1.4.2-py2.7.egg > [/code] > > The pythonpath from commandline is: > [code]C:\Windows\system32\python27.zip > D:\python27 > D:\python27\DLLs > D:\python27\lib > D:\python27\lib\lib-tk > D:\python27\lib\plat-win > D:\python27\lib\site-packages > D:\python27\lib\site-packages\pil-1.1.7-py2.7-win32.egg > D:\python27\lib\site-packages\pyparsing-1.5.6-py2.7-win32.egg > D:\python27\lib\site-packages\rdfextras-0.1-py2.7.egg > D:\python27\lib\site-packages\simplejson-2.2.1-py2.7.egg > D:\python27\lib\site-packages\sparqlwrapper-1.4.2-py2.7.egg[/code] > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > _______________________________________________ > Pydev-users mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-users |