在python3.7中导入igraph

时间:2018-10-08 11:52:42

标签: python-3.x python-2.7 igraph

我通过从源代码进行编译在iMacOS 10.13.6上安装了igraph,然后使用

安装了python-igraph。
sudo -H pip uninstall igraph

(否则,它尝试导入其他内容),然后

sudo -H pip install python-igraph

现在在python2.7中,我可以导入igraph,但不能在python3.7中导入,

ModuleNotFoundError: No module named 'igraph'

python来自Homebrew:

which python

返回

/usr/local/bin/python

ls -l /usr/local/bin/python

.../usr/local/bin/python -> ../Cellar/python@2/2.7.15_1/bin/python

同时

which python3    // or 3.7
ls -l /usr/local/bin/python3

返回

/usr/local/bin/python3    // or 3.7
.../usr/local/bin/python3 -> ../Cellar/python/3.7.0/bin/python3   // or 3.7

0 个答案:

没有答案