Isa Goksu
September 13 2009

Learning Site Packages Folder Under OSX

Today I was browsing couple Django extensions to check if there is any new useful stuff around. I saw couple questions in those WiKis/forums about site-packages folder under OSX.

For those who don't know which site-packages folder is active in your system, you must consider how your system is configured. Especially if you're using HomeBrew kinda tool and installed python that way, your default site-packages folder that is shipped with OS X might have changed.

Anyways, the best way to learn what's your active site-packages folder is to type following in the python REPL:

from distutils.sysconfig import get_python_lib;
print get_python_lib()

Or you could just write following in the terminal:

python -m site --user-site
  1. https://docs.python.org/2/library/site.html
  2. http://brew.sh/
  3. http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop