【问题标题】:python numpy was installed but throws " ModuleNotFoundError: No module named 'numpy'"python numpy 已安装但抛出“ModuleNotFoundError: No module named 'numpy'”
【发布时间】:2019-02-07 08:26:04
【问题描述】:

我已经在 ubuntu 上安装了 numpy。它在终端上运行良好,但是当我想将它导入到我的工作目录时,它会显示这个错误

回溯(最近一次通话最后): 文件“”,第 1 行,在 ModuleNotFoundError:没有名为“numpy”的模块

【问题讨论】:

  • 你能把你的代码和你的问题一起添加吗
  • 你是如何在 ubuntu 上安装 numpy 的?
  • 您的计算机上是否有多个 Python 版本,而 numpy 仅安装在其中一个版本中?

标签: python numpy


【解决方案1】:

试试这个:

sudo pip install numpy

还有这个

sudo pip install spyder (numpy is included)

或

sudo easy_install numpy

【讨论】:

    猜你喜欢
    • 2019-11-29
    • 2022-08-24
    • 2019-05-10
    • 2022-08-11
    • 2018-12-17
    • 1970-01-01
    • 2021-02-18
    • 2021-04-05
    • 2019-07-02
    相关资源
    最近更新 更多