200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > Python 安装 包时 VC 14 找不到错误终极解决办法

Python 安装 包时 VC 14 找不到错误终极解决办法

时间:2019-03-06 06:18:45

相关推荐

Python 安装 包时 VC 14 找不到错误终极解决办法

python setup.py bdist_wheel did not run successfully.

修改源码:M:\work\tool\Python39x64\Lib\site-packages\setuptools\msvc.py

中 函数def _msvc14_find_vc():

下代码:

try:

path = subprocess.check_output([

join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"),

"-latest",

"-prerelease",

"-requiresAny",

"-requires", "ponent.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", "ponent.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"

由于安装的精简版本没有Installer目录及相关文件

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。