site-package
How to locate site-package location?
From the terminal, issue the following command:
>> python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
>> python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
>> python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
There are two ways to make your own modules to become searchable by Python runtime:
- define PYTHONPATH -- prepend to sys.path.
- use .pth files -- append to sys.path. Usually .pth files are placed in site-package folder.