Importing the numpy c-extensions failed

created at 06-27-2021 views: 1

description

After installing pytorch through the official website command,
When the test is performed, an error occurs like a question

Error message:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed. - Try uninstalling and reinstalling numpy. - If you have already done that, then: 1. Check that you expected to use Python3.7 from C:\Users\ramim\Miniconda3\python.exe, and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy version 1.17.3 youre trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log
If youre working with a numpy git repository, try git clean -xdf (removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please dont comment on an existing issue about this - open a new one instead.

solution

pip uninstall -y numpy

pip uninstall -y setuptools

pip install setuptools

pip install numpy
Please log in to leave a comment.