我在我的Mac中安裝了anaconda。我正在嘗試安裝python-igraph。在Mac OSX中安裝python-igraph Sierra
我嘗試下面的命令來安裝它:
$ brew install igraph
$ pip install python-igraph
我的蟒蛇設置:
Python 2.7.13 |Anaconda custom (x86_64)| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin`
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
但是,當我嘗試導入igraph
,我得到以下錯誤:
>>> import igraph
Traceback (most recent call last):
File "", line 1, in
File "/Users/arefindk/anaconda2/lib/python2.7/site-packages/igraph/init.py", line 34, in
from igraph._igraph import *
ImportError: dlopen(/Users/arefindk/anaconda2/lib/python2.7/site-packages/igraph/_igraph.so, 2): Symbol not found: _iconv
Referenced from: /Users/arefindk/anaconda2/lib/python2.7/site-packages/igraph/_igraph.so
Expected in: flat namespace
in /Users/arefindk/anaconda2/lib/python2.7/site-packages/igraph/_igraph.so
N我試圖按照answer提供的所有步驟操作。
我的預感是,它可能是一個與Anaconda有關的問題,因爲我的朋友使用上述命令成功安裝並導入了python-igraph,並且他沒有安裝Anaconda。
我該如何解決這個問題,並讓我的Mac保持Anaconda?
'conda install -y -c bioconda python-igraph'爲我工作。謝謝!! –