问题
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