[Pythonmac-SIG] Ownership of installed Python on Mac
njriley at illinois.edu
Tue Aug 9 21:00:20 CEST 2011
On Tue, Aug 09, 2011 at 06:21:17PM +0100, Michael Foord wrote:
> In all cases (I'm pretty sure) the installation required elevation and the
> installed Python was 'owned' by root - meaning any changes (e.g.
> installation into site-packages) must be sudo'd.
> This is a change from previous versions of OS X. Is this known, and is it an
> issue? (I chown'd everything back to me to get round it.)
Yes, it's an intentional decision, made for security reasons:
The only inconsistent part is that /Library/Java is still
admin-writable; /Library/Java/Extensions contains jars which end up on
the classpath of all Java applications, so not allowing the equivalent
thing for Python seems a bit strange. This might just be linked to
the removal of Java as part of the base system, though.
You could only install Python packages as an admin user (without sudo)
if they didn't try to create any scripts, which ended up in
/usr/local/bin which isn't admin-writable even on Snow Leopard.
Now I just install everything in a virtualenv and am generally
Nicholas Riley <njriley at illinois.edu>
More information about the Pythonmac-SIG