[Distutils] easy_install and sys.path

Tres Seaver tseaver at palladion.com
Tue May 8 18:20:45 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bryan Lawrence wrote:

> Can anyone point me to why easy_install forces modules to the front
> of sys.path? It seems to break long established rules about ordering 
> of path variables,  and certainly breaks python in some unexpected
> contexts e.g:
> https://bugs.launchpad.net/ubuntu/+source/kubuntu-meta/+bug/113298

In your case, you have libraries mixed from two different version s of
python.  From that launchpad issue:

> ok, and quite clearly my path has all the /usr/local stuff in it first:
>>>> import sys
>>>> print sys.path
> ['',
'/usr/local/lib/python2.5/site-packages/simplejson-1.4-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/Amara-1.1.9-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/flup-0.5-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/scgi-1.12-py2.5-linux-i686.egg',
'/usr/local/lib/python2.5/site-packages/Paste-1.0-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/ZSI-2.0.dev_r1293-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/dap-2.2.5.1-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/httplib2-0.2.0-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/Cheetah-2.0rc7-py2.5-linux-i686.egg',
'/usr/local/lib/python2.5/site-packages/dap.plugins.grads-0.1.1-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/arrayterator-0.2.5-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/PasteDeploy-1.0-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/PasteScript-1.0-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/dap.plugins.netcdf-0.3.2-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/pupynere-0.2.1-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/wsgistate-0.4-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.3.3-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/WSGIUtils-0.7-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/kid-0.9.5-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/PyOpenGL-3.0.0a5-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/Genshi-0.4-py2.5.egg',
'/usr/local/lib/python2.5/site-packages/wsgilog-0.1-py2.5.egg',
'/usr/lib/python25.zip', '/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages', '/var/lib/python-support/python2.5']

AFAIK, This can only happen because you have a .pth file in some 'site'
directory which is mistakenly pulling in the "alien" eggs, which should
never happen.  *None* of those eggs are guaranteed to work in a
different Python than the one which built them;  in your case, the UCS2
vs. UCS4 bit is interfering, but it could equally well be a different
dynload problem.

If you run with 'site' stuff disabled, is your sys path free of those
eggs?  E.g.:

 $ /usr/bin/python -S

If so, find the errant .pth file and remove it (or fix the paths in it).


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQKNd+gerLs4ltQ4RAuMjAKCluKWopcuCk/rzaIRXdKF4tOqiywCfWauk
GAuW/hxxNkIPnEbRGlu6f08=
=ya5z
-----END PGP SIGNATURE-----



More information about the Distutils-SIG mailing list