Ubuntu上的Python Igraph导入错误16.04



我最近将Ubuntu从14.04升级到16.04,并且使用Python Igraph(在Anaconda上)有奇怪的问题。我在14.04中没有任何问题。

特别是 - PIP安装Python -rigraph似乎有效:

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

但是,试图导入Igraph(在Python上的IPYTHON 2.7.12 | ANACONDA 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 Arch或OSX上看到了一些与类似问题的线程,而这些解决方案似乎都不适合。知道什么是缺少的?

谢谢!

安装/重新安装/卸载/重新编译Python igraph和C核心库会产生挫败感,这是有效的:我用pip和conda卸载了python-graph在搜索root(cd/sudo find -name igraph )之后,我删除了所有IGRAPH目录。现在,这是对塔玛斯·尼普斯(TamásNepusz)(@ntamas)的魔力:只需在Anaconda Python安装预编译的二进制包:

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

从这里取:https://anaconda.org/marufr/python-igraph

这很简单。(但是我仍然对python igraph和我以前经历过的C库之间的冲突感到困惑。至少我有它的工作)。

相关内容

最新更新