python setup.py bdist_wheel did not run successfully.
修改源码:M:\work\tool\Python39x64\Lib\site-packages\setuptools\msvc.py
中 函数 def _msvc14_find_vc2017():
下代码:
try:
path = subprocess.check_output([
join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"),
"-latest",
"-prerelease",
"-requiresAny",
"-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"-requires", "Microsoft.VisualStudio.Workload.WDExpress",
"-property", "installationPath",
"-products", "*",
]).decode(encoding="mbcs", errors="strict").strip()
except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
return None, None
为:
# try:
# path = subprocess.check_output([
# join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"),
# "-latest",
# "-prerelease",
# "-requiresAny",
# "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
# "-requires", "Microsoft.VisualStudio.Workload.WDExpress",
# "-property", "installationPath",
# "-products", "*",
# ]).decode(encoding="mbcs", errors="strict").strip()
# except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
# return None, None
path="C:\\Program Files (x86)\\Microsoft Visual Studio 14.0"文章来源:https://www.toymoban.com/news/detail-470754.html
由于安装的精简版本没有Installer目录及相关文件文章来源地址https://www.toymoban.com/news/detail-470754.html
到了这里,关于Python 安装 包时 VC 14 找不到错误终极解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!