0

Everytime I try to load PyObjC via the terminal in my Macbook Air (OS X 10.8.2) I get the following error. I am the only user on the Mac so what do I do?

Davids-MacBook-Air:~ dave$ easy_install pyobjc==2.2 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-357.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.

David Bailey
  • 603
  • 2
  • 7
  • 19

1 Answers1

2

You're trying to install it in the system Python, which is owned by root. You could try doing sudo easy_install, although I've heard warnings that it's a bad idea. Alternately, you could just install a new Python and use that instead of the system Python (which tends to be at least a bit outdated). You could also try changing the permissions of the system Python's site-packages: chmod a+w /Library/Python/2.7/site-packages/.

khagler
  • 3,996
  • 29
  • 40
  • Thanks SO much for the answer. I have tried and failed all three :( Is there a good guide for installing the new python - I have downloaded and run the relevant files from Python.org and its still Python 2.7.2 that runs in the terminal. – David Bailey Dec 04 '12 at 06:09
  • You need to update PATH in your .bash_profile so that the new Pyhton version you installed is at the beginning. The Python installer doesn't do that for you. – khagler Dec 04 '12 at 06:45