Python Dependency Management: Examples and Reference
Last updated:Table of Contents
WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.
Get path to site-packages
Must activate virtualenv, if applicable
Run python -m site
. It will be listed (usually last element)
# python -m site
sys.path = [
'/momo/src/momo',
'/usr/local/lib/python39.zip',
'/usr/local/lib/python3.9',
'/usr/local/lib/python3.9/lib-dynload',
'/usr/local/lib/python3.9/site-packages', <--- HERE
]
USER_BASE: '/root/.local' (doesn't exist)
USER_SITE: '/root/.local/lib/python3.9/site-packages' (doesn't exist)
ENABLE_USER_SITE: True