Comment 3 for bug 1838866

Revision history for this message
Mark Sapiro (msapiro) wrote :

I have now looked at the code for site.getsitepackages() at https://github.com/python/cpython/blob/master/Lib/site.py#L319 and it seems no better than what's in paths.py.in, so I'm not sure this will be effective unless your distro hacks site.py. Is that the case?

It appears Ubuntu does hack site.getsitepackages() to actually return ['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages'].

I am reluctant to do anything without a better understanding of what site.getsitepackages() returns in various distros.