Python site-packages permission denied?

Steven D'Aprano steve+comp.lang.python at
Thu Mar 8 12:34:39 CET 2012

On Wed, 07 Mar 2012 21:47:37 -0800, Ned Deily wrote:

> In article
>  Chris Rebert <clp2 at> wrote:
>> You generally shouldn't mess with Mac OS X's system copies of Python.
>> Typically, one installs a separate copy using MacPorts, Fink, or
>> whatever, and uses that instead.
> I don't understand what you mean by "mess with".  Certainly one should
> not attempt alter standard library modules provided with the system
> Python but adding additional packages is fully supported.

I read Chris as making a general comment that one should be cautious 
about making changes to the system copy of Python, advice that holds for 
all OSes not just OS-X.

> Apple
> conveniently provides a special directory in user-controlled space
> (/Library/Python) as the default location for Distutils-based installs.
> They even provide versions of easy_install for the system Pythons.

Perhaps so, but it seems to have the permissions messed up, or some other 
problem, because the OP can't write to it. His error is:

    copying build/lib/ -> /Library/Python/2.7/site-packages
    error: /Library/Python/2.7/site-packages/ 
    Permission denied

I note also that Chris' final comment was:

"In any case, you generally need to `sudo` when installing stuff system-

which is probably the solution the OP is looking for.


More information about the Python-list mailing list