Comment 3 for bug 1814653

Revision history for this message
vital (vsbogd) wrote :

The issue is that if `get_python_lib()` is called with `prefix='/usr/local'` argument then Ubuntu version returns:
``` sh
$ /usr/bin/python3 -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr/local'))"
/usr/local/lib/python3/dist-packages
```

while mainstream Python returns:
```sh
$ python3 -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr/local'))"
/usr/local/lib/python3.6/site-packages
```

`sys.path` (in both Ubuntu and mainstream Python) doesn't contain `/usr/local/lib/python3/dist-packages` path, it contains `/usr/local/lib/python3.6/dist-packages` instead, so when `/usr/local` prefix is used things don't work:
```
$ PYTHONPATH='' /usr/bin/python3 -c "import sys; print(sys.path)"
['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/vital/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']
```