Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not install packages due to a "Environment error :[error 13]: permission denied : 'usr/local/bin/f2py'"

I am trying to install numpy on macOS X but after executing the command pip install numpy I am getting the error:

Environment error :[error 13]: permission denied : 'usr/local/bin/f2py

How do I fix it?

like image 311
Sid Mehta Avatar asked Jun 11 '18 23:06

Sid Mehta


1 Answers

This worked for me.

pip3 install --user package-name  # for Python3 pip install --user package-name   # for Python2 

The --user flag tells Python to install in the user home directory. By default it will go to system locations. credit

like image 169
SolitaryReaper Avatar answered Oct 09 '22 17:10

SolitaryReaper