Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSError: [Errno 13] Permission denied when updating setuptools

I'm trying to update setuptools using homebrew but I keep getting an error that says:

OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/setuptools-1.1.3-py2.7.egg'

How do I allow my computer to make changes to that file so I can update setuptools?

like image 314
davzaman Avatar asked Mar 01 '14 23:03

davzaman


1 Answers

I figured out how to fix it! I looked up the name of that file setuptools-0.6c11-py2.7.egg and I found a python page on it that says

NOTE: Regardless of what sort of Python you're using, if you've previously installed older versions of setuptools, please delete all setuptools*.egg and setuptools.pth files from your system's site-packages directory (and any other sys.path directories) FIRST.

So I deleted setuptools-0.6c11-py2.7.egg and setuptools.pth in /Library/Python/2.7/site-packages/ then I went into terminal and typed in pip install --upgrade setuptools and it worked!

like image 183
davzaman Avatar answered Oct 05 '22 19:10

davzaman