ModuleNotFoundError: 未找到名为 ‘numpy’ 的模块安装问题

huangapple go评论64阅读模式
英文:

ModuleNotFoundError: No module named 'numpy' problem installing it

问题

我已经尝试通过终端安装numpy,但仍然遇到相同的错误。似乎仍然无法识别它。

import numpy as np

---------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 import numpy as np

ModuleNotFoundError: No module named 'numpy'

我期望能够导入numpy,但仍然收到相同的错误。我尝试使用命令"pip install numpy"来安装和重新安装它。

英文:

I have tried to install numpy via terminal and still have the same error. It doesn't seem to recognise it still.

import numpy as np

---------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 import numpy as np

ModuleNotFoundError: No module named 'numpy'

I was expecting to import bumpy but I still get the same error. I tried installing and re installing it by the command pip install numpy

答案1

得分: 1

由于您的错误消息是Jupyter样式(因为有`Cell In[1]`),
请在您的单元格中尝试`%pip install numpy`。
英文:
ModuleNotFoundError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import numpy as np

Because your error message is jupyter style(because of Cell In[1]),
try %pip install numpy in your cell.

huangapple
  • 本文由 发表于 2023年7月13日 19:06:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76678675.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定