helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
805 stars 58 forks source link

Add a PYTHONPATH that is not dependent on the Python version #377

Open probonopd opened 2 years ago

probonopd commented 2 years ago

We should add a PYTHONPATH that is not dependent on the Python version so that we can install some site-packages there without them breaking whenever the minor version of Python changes.

By default there is just:

FreeBSD% python3 -c "import sys; print('\n'.join(sys.path))"

/usr/local/lib/python38.zip
/usr/local/lib/python3.8
/usr/local/lib/python3.8/lib-dynload
/home/user/.local/lib/python3.8/site-packages
/usr/local/lib/python3.8/site-packages
probonopd commented 2 years ago

In the meantime, we can

import sys
sys.path.append('/usr/local/lib/python3/site-packages')
. . .
import <your-python-module>
probonopd commented 2 years ago

This is what we are doing in https://github.com/helloSystem/ISO/commit/0d712b4e7b762ea521d707ab3e42910f78787398 now.