PygraphViz Import Error With PyCharm

末鹿安然 提交于 2019-12-05 01:39:45

This guide should help you configuring everything including custom paths to your libraries.

The interpreter is ok, it is already pointing to Anaconda's distribution. But under "Default Project" settings there is an option for the console: "Build, Execution,Deployment" -> "Console" -> "Python Console". See what you can fiddle with there. If you can't make it work maybe post your config.

Also, you should be working with virtual environments. See this article for more info.

Just in case someone else comes across a similar problem like I did... I had to install pygraphviz from the bin directory of the virtual environment, specifying the pip3 file I wanted to use. Nothing I tried could get it to work from through the PyCharm Project Interpreter window. But this worked from a terminal (MacOS), having installed graphviz with homebrew.

    ./pip3 install --install-option="--include-
         path=/usr/local/include/graphviz/" \
         --install-option="--library-path=/usr/local/lib/graphviz" \
         pygraphviz
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!