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

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

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

The second solution is –

pip install --user package-name

Seems to work, but the package is install the the path of user. such as :

“c:\users\***\appdata\local\temp\pip-req-tracker-_akmzo\42a6c7d627641b148564ff35597ec30fd5543aa1cf6e41118b98d7a3”

I want to install the package in python folder such c:\Python27. I install the module into the expected folder by:

pip install package-name --no-cache-dir

Third solution is –

I am also a Windows user. And I have installed Python 3.7 and when I try to install any package it throws the same error that you are getting.

Try this out. This worked for me.

python -m pip install numpy

And whenever you install a new package just write

python -m pip install <package_name>

Leave a Comment