3

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?

3 Answers 3

6
/Library/Python/x.x/site-packages

(x.x designates the version).

2
  • 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 Sep 22, 2011 at 2:51
  • nevermind, figured it out (/Library/Python/2.7/site-packages) Sep 22, 2011 at 2:57
1

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

1

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())

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .