我正在尝试从Windows 10上的源代码构建PyTorch(如pytorch repo中所述),并且出现了MSBUILD错误:
Building wheel torch-1.1.0a0+542c273
-- Building version 1.1.0a0+542c273
Microsoft (R) Build Engine 15.9.21+g9802d43bc3 dla platformy .NET Framework
Copyright (C) Microsoft Corporation. Wszelkie prawa zastrzeżone.
MSBUILD : error MSB1009: Project file does not exist.
Switch: INSTALL.vcxproj
Traceback (most recent call last):
File "setup.py", line 710, in <module>
build_deps()
File "setup.py", line 282, in build_deps
build_dir='build')
File "C:\Users\MarcinM\pytorch\tools\build_pytorch_libs.py", line 250, in build_caffe2
cwd=build_dir, env=my_env)
File "C:\Users\MarcinM\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release']' returned non-zero exit status 1.
我所做的:
运行:
设置“ CUDAHOSTCXX =%VS140COMNTOOLS%.... \ VC \ bin \ amd64 \ cl.exe” 设置CMAKE_GENERATOR = Visual Studio 15 2017 Win64 设置DISTUTILS_USE_SDK = 1 python setup.py install
命令的顺序是否可能导致我出现此错误(在安装VS工具集后运行了4.)? 你能帮我克服这个错误吗?
Windows 10 python 36 CUDA 9.1