Skip to main content
 首页 » 编程设计

python之导入错误 : numpy is not installed on your system

2025年02月15日13xing901022

我是一名使用 Python 的新程序员。我在 64 位 Windows 中使用 python 3.5。 我安装了 libpgm 模块,但是当我输入 from libpgm.pgmlearner import PGMLearner 时我收到了这个错误:

ImportError, "numpy is not installed on your system." 然后我使用 pip 安装 numpy。现在当我输入 import numpy我没有收到任何错误,但是当我输入 from libpgm.pgmlearner import PGMLearner 时我得到这个错误:

Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> from libpgm.pgmlearner import PGMLearner File "C:\Users\Asus\AppData\Local\Programs\Python\Python35\lib\site-packages\libpgm\pgmlearner.py", line 35 raise ImportError, "numpy is not installed on your system."

有没有人可以帮助我?...谢谢。

请您参考如下方法:

为了使库正常工作,"Python 2.7" 、numpy 和 scipy 是必需的,很遗憾,您正在使用 Python 3.5

通过libpgm docs