Where is Python site-package directory

Python libraries are installed or linked to the lib/python?.?/site-packages/ directory. The location of this directory is revealed by:

python -c "import site; print(site.getsitepackages())"

The output will be like:

~/miniconda3/lib/python3.7/site-packages

virtual environments

There are multiple ways to setup virtual environments, the command above will be particular to the virtual environment, for example:

~/miniconda3/envs/py36/lib/python3.6/site-packages’