I get "sanity check" and "No module" errors in import numpy

Cause:

The problem with the "sanity check" error is that the numpy version is 1.19.4. The problem with the "No module" error is that numpy is stored in a different location.

environment

Windows10 Python3.8.3 numpy1.19.4

Details

The error "RuntimeError: The current Numpy installation fails to pass a sanity check due to a bug in the windows runtime." Is https://stackoverflow.com/questions/64654805/how-do-you-fix-runtimeerror-package- fails-to-pass-a-sanity-check-for-numpy-an As shown in, it is solved by lowering the version.

With a command

pip install numpy==1.19.3

Then the package c:\users\owner\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages It is saved in. You can't import as it is, and you will get an error of ModuleNotFoundError: No module named'numpy'. numpy and numpy-1.19.3.dist-info folders C:\Users\owner\AppData\Local\Programs\Python\Python38\Lib\site-packages It works normally when moved to.

Confirmation code

test.py


import numpy
print(numpy.__version__)

Output result 1.19.3

2020/11/11

Recommended Posts

I get "sanity check" and "No module" errors in import numpy
What to do if you get Swagger-codegen in python and Import Error: No module named
Module import and exception handling in python
Import Error in Python3: No module named'xxxxx'
Import cv2 ModuleNotFoundError: No module named'cv2' in python3
About import error of numpy and scipy in anaconda
I get an Import Error in Python Beautiful Soup
When I try to import pandas on macOS I get the error No module named'_bz2'
I want to get rid of import warnings from Pyright and pylint in VS Code
When I import my own module with VsCode, it says No name in module ... for some reason
I get a KeyError in pyclustering.xmeans
Check and move directories in Python
[Question] No module named'Selenium' in PyCharm
ModuleNotFoundError in poetry: No module named'setuptools'
I can't see opencv or matplotlib in vscode. There are no errors.
The file name was bad in Python and I was addicted to import
I get a Python No module named'encodings' error with the aws command
If you get a no attribute error in boto3, check the version