Python 3 pip installation of pygraphviz fails, “Microsoft Visual C++ is required”, Visual Studio 2017 is installed

你说的曾经没有我的故事 提交于 2019-12-11 05:45:31

问题


I tried to pip install pygraphviz, which failed with the error:

"Microsoft Visual C++ 14.0 is required. ..."

I have Visual Studio 2017 installed. Shouldn't that do the job? I think I checked every box related to C.

If I try to install vc_redist.x64.exe, it tells me another version is already installed.

(I think I have a similar/related problem with SciKit-learn and Scipy.)


回答1:


From PyGraphviz documentation -

To use PyGraphviz you need Python version 2.6.x or 2.7.x. PyGraphviz does not work with Python 3.

link to more info.




回答2:


Visual Studio 2017 comes with version 15 of the C++ compiler. It's quite possible that pygraphviz truly wants version 14 (rather than 14-or-better). Version 14 came with VS 2015.

Microsoft's C++ compiler routinely breaks the ABI of the standard library between major versions. They may stop doing that in the future, but that doesn't help you with this problem. You need to get your hands on VC++ 14 (or at least the redistributables that came with VC++14).



来源:https://stackoverflow.com/questions/44842965/python-3-pip-installation-of-pygraphviz-fails-microsoft-visual-c-is-required

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