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:

    1. define PYTHONPATH -- prepend to sys.path.
    2. use .pth files -- append to sys.path. Usually .pth files are placed in site-package folder.