【发布时间】:2022-01-19 05:13:12
【问题描述】:
我在 pypy 中使用 pycharm 运行了 numpy 代码。 我刚刚打印了 np.array 但没有工作。
import numpy as np
print(np.array([1, 2, 3]))
这就是我所做的一切
不知道有没有关系,我的python版本是3.9.2
下面的代码是我得到的错误信息
Traceback (most recent call last):
File "C:\Users\tnvlaos456\Desktop\pypy38\lib\site-packages\numpy\core\__init__.py", line 22, in <module>
from . import multiarray
File "C:\Users\tnvlaos456\Desktop\pypy38\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "C:\Users\tnvlaos456\Desktop\pypy38\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/tnvlaos456/Desktop/practice/practice.py", line 1, in <module>
import numpy as np
File "C:\Users\tnvlaos456\Desktop\pypy38\lib\site-packages\numpy\__init__.py", line 145, in <module>
from . import core
File "C:\Users\tnvlaos456\Desktop\pypy38\lib\site-packages\numpy\core\__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.8 from "C:\Users\tnvlaos456\Desktop\practice\Scripts\pypy.exe"
* The NumPy version is: "1.20.0"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
【问题讨论】:
标签: pypy