Fix for Python library path problem

Eric S. Raymond esr at thyrsus.com
Wed Sep 27 21:21:23 UTC 2017


Fred Wright via devel <devel at ntpsec.org>:
> So *something* is adding additional entries to sys.path in your Ubuntu
> Python (but not mine).  If there's a way to make that happen, it could be
> another solution.  I *don't* see any of that here (ubuntu 14.04, Python
> 2.7.6), even though there are multiple packages with egg files.

You seem to be the odd person out.  We now have confirmation of my rule
(/usr/lib/X/Y in sys.path implies /usr/local/lib/X/Y in sys.path) from
Gentoo and two versions of CentOS, as well as my Ubuntu 16 and
Raspbian systems.

> What does get_python_lib() show in this Python?

>>> import distutils.sysconfig
>>> distutils.sysconfig.get_python_lib()
'/usr/lib/python2.7/dist-packages'
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the devel mailing list