0

When trying to execute the demo given on https://github.com/RDFLib/rdflib-sqlalchemy I receive an error File

"store = plugin.get("SQLAlchemy", Store)(identifier=self.ident)
  File "/usr/local/lib/python3.5/site-packages/rdflib/plugin.py", line 104, in get
    return p.getClass()
  File "/usr/local/lib/python3.5/site-packages/rdflib/plugin.py", line 81, in getClass
    self._class = self.ep.load()
  File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.5/site-packages/rdflib_sqlalchemy-0.2.dev0-py3.5.egg/rdflib_sqlalchemy/SQLAlchemy.py", line 6, in <module>
    from . import sqlalchemy
ImportError: cannot import name 'sqlalchemy'

I installed rdflib-sqlalchemy by cloning the repository and running setup.py. sqlalchemy was installed as a dependency. Any ideas?

trevore
  • 425
  • 2
  • 10
  • Why aren't you using pip and/or virtualenv? You may have accidentally installed sqlalchemy as root or something, leaving it inaccessible to your normal user. There's probably no reason to install any of this globally. Especially on Linux this can cause real problems for system maintenance. – Two-Bit Alchemist Oct 21 '15 at 15:41

1 Answers1

0

I came across this, it has to do with python 2 to 3 changing the import line in the SQLAlchemy.py to one that uses a relative path.

See https://github.com/RDFLib/rdflib-sqlalchemy/issues/16

user712225
  • 139
  • 1
  • 2