My question is why /usr/lib/python3.8/site-packages/ is not being added to sys.path; I expect it to have been added by the site module.
Some details: from within a Docker container, I am using pip install -e to install some Python packages in editable mode. The packages get installed to /usr/lib/python3.8/site-packages; however this directory is not in sys.path so I cannot import them.
The site module docs say:
lib/pythonX.Y/site-packages... if it refers to an existing directory, and if so, adds it to sys.path. I've confirmed that this directory exists so I expect it to be added.
python3 -m site prints:
sys.path = [
'/',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/usr/local/lib/python3.8/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/root/.local' (doesn't exist)
USER_SITE: '/root/.local/lib/python3.8/site-packages' (doesn't exist)
ENABLE_USER_SITE: True
thanks for any help.