How do I find the location of my Python site-packages directory?

You can find the location of Python site-packages directory by using the site module in the following way −

>>> import site
>>> site.getsitepackages()
['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

If you want the per user site packages directory, then run the following code in your shell −

$ python -m site --user-site