srkunze/ckanext-semantic

ImportError: No module named RDF

seanh opened this issue · 8 comments

What is this RDF module it's trying to import? Looks like it was missing from the instructions? (I tried to google it but can't seem to figure out which module it is that I need to install.)

It's the python binding of the Redland Library. I would recommend installing the latest version as the version bundled with Ubuntu 10.04 is out of date.

Btw. have you received my messages in #ckan?

I must have missed your messages on #ckan. Can you resend them?

I've done pip install rdflib but I'm still getting ImportError: No module named RDF. Can you tell me the command I need to install it? (It seems to be missing from the README) (I'm on Ubuntu 12.04.)

Generally a good process for installing an extension in a development environment could be something like:

sudo apt-get install any necessary non-python dependencies
pip install -e git+https://github.com/srkunze/ckanext-semantic#egg=ckanext-semantic
pip install -r ckanext-semantic/pip-requirements.txt

and then do any config file changes, run paster commands to setup databases, etc.

Can you add a pip-requirements.txt file that I can run specifies all the dependencies and the version numbers? I see you have a pip-install.txt file but it doesn't seem to contain everything.

Ah, no. rdflib is not the right library. That is a pure pythonic rdf library (a very good actually) but I use the REDLAND one with Python bindings. LODStats used it so I went for it as well as it is far more efficient.

Wait a second.

That is the homepage.
http://librdf.org/
the bindings are here
http://librdf.org/docs/python.html

you need the binary package and the bindings.

pip-requirements and pip-install are the same? The only contain python packages, right?

The problem with "sudo apt-get install any necessary non-python deps" as describe here https://github.com/srkunze/LODStats is that with Ubuntu 10.04 the REDLAND lib is not fully operational for the extension; some strange errors. So, I had to build them from source. Maybe, you are more lucky with 12.04.

Btw., I appreciate every advice on reformulating the install instructions.

Closing this issue as I think it can be covered as part of #4