我已经使用pip install安装了igraph form .whl文件。 当我试图testing安装的正确性
import igraph.test igraph.test.test()
我得到这个错误:
Traceback (most recent call last): File "D:/Nauka/Praca-inzynierska/Barabasi-Albert.py", line 4, in <module> import igraph.test File "D:\Programy\Python 3.5\lib\site-packages\igraph\__init__.py", line 34, in <module> from igraph._igraph import * ImportError: No module named 'igraph._igraph'
(如果我试图导入igraph而不是igraph.test,同样的错误会popup)。
我已经尝试添加path(我不知道这是否可行):
import sys sys.path.append ("D:/Programy/Python 3.5/Lib/site-packages/igraph")
但它没有工作。
我发现的一件事是,如果我从igraph文件夹删除“__init__”文件,我可以导入igraph没有错误,但它不适用于igraph.test。
如果它是相关的,我的Python 2.7上同时安装了Python 2.7。
预先感谢您的任何帮助。