0

I am using Python 3.9 and I just installed numpy version 1.19.4 using pip. However I got the following error messages:

WARNING: The script f2py.exe is installed in 
'c:\users\paul\appdata\local\programs\python\python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn- 
script-location.
Successfully installed numpy-1.19.4
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the 
'c:\users\paul\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' 
command.

I have found some other questions regarding the first error message. But I can't find any way to solve my problem. For example I tried the top answer on this question: PIP 10.0.1 - Warning "Consider adding this directory to PATH or..." But it didn't work since it didn't show me the 2 lines he used in his solution. Can anyone please help me? I'm lost here.

Edit: I tried the solution given by MikeH. But after that it still doesn't work. I get the same warning when installing numpy and i get the following error messages when I try to import it in python:

>>> import numpy
** On entry to DGEBAL parameter number  3 had an illegal value
** On entry to DGEHRD  parameter number  2 had an illegal value
** On entry to DORGHR DORGQR parameter number  2 had an illegal value
** On entry to DHSEQR parameter number  4 had an illegal value
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "C:\Users\Paul\AppData\Local\Programs\Python\Python39\lib\site- 
 packages\numpy\__init__.py", line 305, in <module>
 _win_os_check()
 File "C:\Users\Paul\AppData\Local\Programs\Python\Python39\lib\site- 
 packages\numpy\__init__.py", line 302, in _win_os_check
 raise RuntimeError(msg.format(__file__)) from None
 RuntimeError: The current Numpy installation 
 ('C:\\Users\\Paul\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site- 
 packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug 
 in the windows runtime. See this issue for more information: 
 https://developercommunity.visualstudio.com/content/problem/1207405/fmod- 
 after-an-update-to-windows-2004-is-causing-a.html

This is a picture of the path in system variables: https://i.stack.imgur.com/qC9Uh.jpg

Paul.0416
  • 3
  • 3
  • Neither of those are errors, they're just warnings; unless numpy doesn't work, there's no explicit need to fix those, is there? – Random Davis Nov 24 '20 at 20:20
  • Unfortunately, Numpy doesn't work when I try to import it in python. – Paul.0416 Nov 24 '20 at 20:53
  • Does [this](https://stackoverflow.com/questions/64654805/how-do-you-fix-runtimeerror-package-fails-to-pass-a-sanity-check-for-numpy-an) help? – Random Davis Nov 24 '20 at 21:01
  • Hello. I am sorry for saying thank you, but: Thank you so much. I just couldn't figure it out. The problem was that I indeed was using numpy 1.19.4 with python 3.9 which apparently doesn't work.. Thank you. I was stuck on this for hours, – Paul.0416 Nov 24 '20 at 21:24

1 Answers1

0

The lower warning refers to pip being outdated. This does not have a large influence, but you might consider running the following as ericl already pointed out:

py -m pip install --upgrade pip

Now to the first error. The folder the Python packages are installed is not included in the Windows Environment Variables. To solve this press the Windows key and search for "Edit the system environment variables". Then click on "Environment Variables". On the bottom you will find System Variables, where there is one called "Path". Clock on that and press "Edit". Then click "New" and paste the path the error mentioned. (c:\users\paul\appdata\local\programs\python\python39\Scripts) For Screenshots check the following: https://www.architectryan.com/2018/08/31/how-to-change-environment-variables-on-windows-10/ This will ensure that packages can be found everywhere.

MikeH
  • 23
  • 1
  • 5
  • I have done what you said but it still doesn't seem to work. I added it to the system variables. [see link](https://imgur.com/a/x1Jis6v) . After that I reinstalled numpy but then it still gave me the same error message when installing. Also when I try to import it in python I get another error message. I edited my post so you can see it. – Paul.0416 Nov 24 '20 at 20:52