Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm pretty sure before Lion, I was using /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages

Although this might have been from a manual install of 2.7 on 10.6 OS X.

Anyway, any idea where standard location is for python packages that are installed?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted
/Library/Python/x.x/site-packages

(x.x designates the version).

share|improve this answer
    
I'm not seeing the site-packages folder anymore in there though.. For instance, I have django installed, but can't find it's source files –  Dolan Antenucci Sep 22 '11 at 2:51
    
nevermind, figured it out (/Library/Python/2.7/site-packages) –  Dolan Antenucci Sep 22 '11 at 2:57
add comment

Found it! Python packages are installed in /Library/Python/2.7/site-packages by default.

share|improve this answer
add comment

Answers are correct for the default OSX install of Python. If you have been mucking about trying different versions and changing paths you might be using a different one. If you are struggling with not being able to import packages that you installed. Try:

from distutils.sysconfig import get_python_lib
print(get_python_lib())
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.