Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


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:


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

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

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

migrated from 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
up vote 2 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

You must log in to answer this question.