[Nix-dev] python fails to find rdflib

Florian Friesdorf flo at chaoflow.net
Fri Feb 24 16:58:08 CET 2012


Hi Yury,

On Thu, 23 Feb 2012 22:18:07 +0400, "Yury G.  Kudryashov" <urkud.urkud at gmail.com> wrote:
> Hi!
> 
> The following fails for me:
> echo import rdflib | \
> PYTHONPATH=${pythonPackages.rdflib}/lib/python2.7/site-packages python -
> 
> What should I use instead? $PYTHONPATH contains rdflib-3.0.0-py2.7.egg.

Debugging your problem
----------------------
The full actually used sys.path and content of rdflib's site-packages
would be helpful for debugging:

echo import sys,pprint;pprint.pprint(sys.path) | \
PYTHONPATH=${pythonPackages.rdflib}/lib/python2.7/site-packages python -

ls -l ${pythonPackages.rdflib}/lib/python2.7/site-packages


Maybe solving your problem
--------------------------
You could check the patch series at:
https://github.com/chaoflow/nixpkgs/tree/python

starting with:
https://github.com/chaoflow/nixpkgs/commit/5ef258be0ca0d7ce12353b5b3ebd7281fb9468ff


Also the single commit at
https://github.com/chaoflow/nix/commit/f0e3b4d1ca60b039b727a6e5d411f3d2b41bbf66
which you can apply to buildenv.pl in the store.


I'm currently rebuilding my system with these patches based on the
stdenv-updates branch and will push them, if all goes well.

With these patches you can:

nix-env -p a -i nixpkgs_sys.python27Full
nix-env -p a -i nixpkgs_sys.python27Packages.rdflib
nix-env -p a -i nixpkgs_sys.python27Packages.site

Beware, that you do not want to install "site" into normal profiles, as
it will remove the isolation of python scripts from profiles they are
installed in, but make all packages in a profile available to all python
scripts in the profile.

regards
florian
-- 
Florian Friesdorf <flo at chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120224/dd4c9c0d/attachment.bin 


More information about the nix-dev mailing list