pygraphviz, ImportError: undefined symbol: Agundirected

旧街凉风 提交于 2019-12-04 08:27:53

First of all, uninstall your current module:

 pip uninstall pygraphviz

then check your paths with:

 pkg-config --libs-only-L libcgraph
 pkg-config --cflags-only-I libcgraph

That commands should tell the path to the library, for example:

-I/usr/include/graphviz  

Then, using the path from the above output, run [within your virtualenv] the command:

pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"

Source: https://github.com/pygraphviz/pygraphviz/issues/71

Daniel

On Ubuntu 14.04 @Martin0x777's answer did not work for me. So I installed pygraphviz from github instructions and the error is gone:

git clone https://github.com/pygraphviz/pygraphviz.git
cd pygraphviz
python setup.py install
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!