Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error while importing numpy
#1
Bug 
Hello,
I have installed Python 3.9 on windows 10(I also installed Anaconda). after that I installed pip because I wanna install numpy. but when I import numpy, I see error below. Does anyone know what should I do to solve this problem?
Thanks Heart
>>> import numpy as np
Error:
Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import numpy as np File "C:\Users\moham\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 305, in <module> _win_os_check() File "C:\Users\moham\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\\moham\\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://tinyurl.com/y3dm3h86
Thanks to all, specially bowlofred.
Quote:pip uninstall numpy
then
pip install numpy==1.19.3
Reply
#2
There seem to be several workarounds on that page, while a proper fix is in the works. Did you at least try any of them?
buran and Erfan like this post
Reply
#3
(Nov-28-2020, 07:28 AM)Erfan Wrote: but there's nothing.
there are at least 2 workaround solutions + explanation when to expect windows fix of the issue that caused the underling bug in the first place (probably around Jan 2021).
The most straightforward workaround is to install exactly numpy 1.19.3 version
Erfan likes this post
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#4
You say "there's nothing" in that thread, but there are several workarounds mentioned. Have you tried them and they don't work, or have you not tried them?

* Downgrade to numpy 1.19.3
Quote:pip uninstall numpy

then

pip install numpy==1.19.3
* Use WSL (windows linux) and python/numpy there.
* Install the 32-bit version of python/numpy.
Erfan likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pyarrow error when importing pandas sravva 1 886 Jun-06-2023, 05:09 PM
Last Post: snippsat
  Numpy error while filling up matrix with Characters august 4 1,799 Apr-13-2022, 10:28 PM
Last Post: august
  ERROR: importing desired module mbgamer28 0 1,649 Apr-05-2021, 07:46 PM
Last Post: mbgamer28
  Importing numPy Milfredo 2 1,850 Aug-23-2020, 09:00 AM
Last Post: Milfredo
  Odd numpy error with subtraction DreamingInsanity 5 2,666 Jun-01-2020, 02:49 PM
Last Post: DreamingInsanity
  Importing module from a package results in import error goghvv 2 2,343 Mar-27-2020, 07:13 PM
Last Post: goghvv
  Error importing package julio2000 3 3,709 Jan-26-2020, 06:15 PM
Last Post: buran
  Error in importing numpy fullstop 1 1,887 Dec-18-2019, 12:07 PM
Last Post: jefsummers
  Error in importing package in pycharm fullstop 0 2,315 Dec-12-2019, 04:03 PM
Last Post: fullstop
  Importing randon error bharat_s579 1 5,587 Jun-03-2019, 09:49 PM
Last Post: michalmonday

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020