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

Python Mohit Mozumder

Problem:

While i am trying to install  numpy on macOS X but after executing the command pip install numpy. I am getting the error-

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


Solution 1:

Try this -

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


Solution 2:

Try this-

python -m pip install numpy

And whenever you install new package just write

python -m pip install <package_name>


Thank you for reading the article. For any problem feel free to ask us.