or

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 MacPorts or any tool like that, your default site-packages folder that is shipped with OS X might be different than what you’re presuming.

Anyways, the best way to learn what’s your active site-packages folder, you can quickly learn it by typing:

$ python -c \ 
"from distutils.sysconfig import get_python_lib;   \
 print get_python_lib()"

Or you can create a script like below and place it under your /usr/bin folder for further uses.

from distutils.sysconfig import get_python_lib;

print get_python_lib()



Leave a Reply

Name (required)
Mail (required)
Website