2016-12-11 157 views
1

我最近將Ubuntu從14.04升級到16.04,我在使用python igraph(在anaconda上)時出現了一些奇怪的問題。 14.04我沒有任何問題。Ubuntu上的python igraph導入錯誤16.04

具體 - PIP安裝python-的igraph似乎工作:

Collecting python-igraph 
Installing collected packages: python-igraph 
Successfully installed python-igraph-0.7.1.post6 

但是,試圖導入的igraph(在IPython中關於Python 2.7.12 |蟒蛇4.2.0(64位),我得到以下:

ImportError        Traceback (most recent call last) 
<ipython-input-3-8e950eb5d8d8> in <module>() 
----> 1 import igraph 

/home/scifric/anaconda2/lib/python2.7/site-packages/igraph/__init__.py in <module>() 
    32 # pylint: disable-msg=W0401 
    33 # W0401: wildcard import 
---> 34 from igraph._igraph import * 
    35 from igraph._igraph import __version__, __build_date__ 
    36 from igraph.clustering import * 

ImportError: /home/scifric/anaconda2/lib/python2.7/site-  ackages/igraph/_igraph.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev 

我看到一些線程在Linux上拱或OSX類似的問題,並沒有解決方案,似乎適合 任何想法,缺什麼

臨屋? NKS!

回答

3

安裝/重新安裝/卸載/蟒蛇的igraph的重新編譯和產生挫折的C核心庫後,這裏是什麼工作: 我卸載蟒蛇-的igraph都與PIP和暢達 我刪除了所有的igraph目錄中搜索所有後(cd/sudo find -name igraph)。 現在,這裏是一個神奇的感謝陶Nepusz(@ntamas): 只需安裝預編譯的二進制包蟒蛇的Python:

conda install -c marufr python-igraph=0.7.1.post6 

從這裏取:https://anaconda.org/marufr/python-igraph

就是這麼的簡單。 (但是我仍然對python igraph和我以前經歷的c庫之間的衝突感到困惑,至少noe我有它的工作)。