简体   繁体   中英

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?

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!

Open Finder and select Go - Go To Folder. Then hit Command-I, and at the bottom under Sharing and Permissions, add yourself with Read and Write Access. This should solve it.

There are some discussions and solutions in this link: Permission Denied Error when 'brew install python

I hope one of it working for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM