Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not install packages due to an OSError: [WinError 2] No such file or directory

Tags:

python

numpy

I try to use pip to install numpy, and I receive the following error message:

Python: Could not install packages due to an OSError: [Errno 2] No such file or directory 'c:\python39\Scripts\f2py.exe' -> 'c:\python39\Scripts\f2py.exe.deleteme'

I'm not sure about an older version of numpy installed first.

I ran just command prompt, not a one with admin privileges.

Here is a command prompt in the picture

Can anyone help? Thanks.

like image 538
Anatoly Avatar asked Feb 22 '21 19:02

Anatoly


2 Answers

Try running the command as administrator:
or
pip install numpy --user to install numpy without any special previlages

like image 126
M2Kishore Avatar answered Oct 13 '22 00:10

M2Kishore


I had the same problem with other packages. Just try

pip install 'package name' --user

and see if the issue is resolved. It worked out for me.

like image 34
MojiProg Avatar answered Oct 13 '22 01:10

MojiProg