Python site-packages permission denied?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu Mar 8 06:34:39 EST 2012
On Wed, 07 Mar 2012 21:47:37 -0800, Ned Deily wrote:
> In article
> <CAMZYqRTXy3mSMXtivuE8ApYX2ZFAG3DQp1UN+fqWnAYWNOANAw at mail.gmail.com>,
> Chris Rebert <clp2 at rebertia.com> 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/urllib2_file.py -> /Library/Python/2.7/site-packages
error: /Library/Python/2.7/site-packages/urllib2_file.py:
Permission denied
I note also that Chris' final comment was:
"In any case, you generally need to `sudo` when installing stuff system-
wide."
which is probably the solution the OP is looking for.
--
Steven
More information about the Python-list
mailing list