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
```
`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']
```
The issue is that if `get_python_lib()` is called with `prefix= '/usr/local' ` argument then Ubuntu version returns: get_python_ lib(prefix= '/usr/local' ))" lib/python3/ dist-packages
``` sh
$ /usr/bin/python3 -c "from distutils.sysconfig import *;print(
/usr/local/
```
while mainstream Python returns: get_python_ lib(prefix= '/usr/local' ))" lib/python3. 6/site- packages
```sh
$ python3 -c "from distutils.sysconfig import *;print(
/usr/local/
```
`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: 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' ]
```
$ PYTHONPATH='' /usr/bin/python3 -c "import sys; print(sys.path)"
['', '/usr/lib/
```