[issue10263] "python -m site" does not print path details

Ned Deily report at bugs.python.org
Sun Oct 31 21:47:56 CET 2010


Ned Deily <nad at acm.org> added the comment:

Unfortunately, the problem here is caused by having setuptools or Distribute installed. As released, both setuptools and Distribute install an easy-install.pth into site-packages to insert its "egg" into sys.path.  If you look inside the egg, you'll see it has its own site.py which gets executed first as a bootstrap to do sys.path manipulations after finding and importing the site module from the standard library.  So -m site actually runs the setuptools/distribute site module and not the expected standard library one.  To work as expected, the problem needs to be corrected in setuptools and Distribute so you may want to open issues with both projects if necessary.

BTW, I was unable to reproduce the problem with a current Debian Linux system with the Debian distribute package installed; it seems that the package there is patched to not install easy-install.pth.  I expect you would see the problem there if you installed either manually.

----------
nosy: +ned.deily
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10263>
_______________________________________


More information about the Python-bugs-list mailing list