Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can someone tell me how to install Pytz on a mac. I can't get the easy install to work. It gives me an error that I am not on the admin account, but I am.

Thanks

Here is the error I get:

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-2030.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.
share|improve this question

migrated from stackoverflow.com Jan 4 '13 at 6:33

This question came from our site for professional and enthusiast programmers.

    
This is not a programming problem; it's a system setup, or basic system usage, problem. Therefore, it belongs somewhere other than SO. I'm not sure where, but my first guess is superuser. –  abarnert Jan 3 '13 at 2:40
add comment

1 Answer 1

up vote 1 down vote accepted

The error message tells you exactly what's wrong, and what to do about it, and where to find more documentation. Exactly what part do you not understand of, for example:

Perhaps your account does not have write access to this directory?

There's no such thing as "the admin account". There is such a thing as "an Admin user". But admin users don't have rights to scribble all over the disk indiscriminately. This is to protect you from screwing up your own system by accident.

There is a root account, which does have rights to scribble all over the disk (and can give itself any rights it doesn't have). But that's not you. No Unix, Mac or otherwise, would have you running as root for normal operation. Instead, they provide tools like sudo and su to let you run as root only while needed.

Which is why the tutorials for easy_install tell you to do this:

sudo easy_install pytz

If you are an Admin user, and you haven't screwed with your setup, you can run any program under sudo. It will ask you for your password, and then it will temporarily become root and run that program.

share|improve this answer
add comment

Your Answer

 
discard

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