HannahFromMontana
HannahFromMontana

Reputation: 1

Can anyone help? Getting "[Errno 13] Permission denied" when I try to install pip on Mac

Thank you in advance for any guidance (I've heard mixed advice on sudo command?). Here is the script from Terminal:

running install
Checking .pth file support in /Library/Python/2.7/site-packages/
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-85961.pth'

Upvotes: 0

Views: 1815

Answers (2)

Shivam Kotwalia
Shivam Kotwalia

Reputation: 1493

Well "sudo" should have worked,

sudo pip install <package-name>

Secondly make sure your pip is updated

sudo pip install --upgrade pip

After running PIP through sudo you might get a warning about "directory is not owned by current user" can be ignored.

Upvotes: 0

DZDomi
DZDomi

Reputation: 1679

You need to be root in order to write inside /Library, therefore you have to issue the install command as root:

sudo <command>

Upvotes: 4

Related Questions