当我运行python setup.py build_ext --inplace
我得到:
... 运行build_ext C:\ python36 \ lib \ site-packages \ torch \ utils \ cpp_extension.py:184:UserWarning:检查cl的编译器版本时出错:[WinError 2] Das System kann die Angegebene Datei nicht finden warnings.warn('检查{}的编译器版本时出错:{}'。format(编译器,错误)) 建立'pointnet2._ext'扩展名
CUDA 9.0
C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ bin> nvcc --version nvcc:NVIDIA(R)Cuda编译器驱动程序 版权所有(c)2005-2017 NVIDIA Corporation 建立在Fri_Sep__1_21:08:32_Central_Daylight_Time_2017 Cuda编译工具,版本9.0,V9.0.176
MSVC
C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ bin> cl 适用于x86的Microsoft(R)C / C ++优化编译器版本19.00.24215.1 版权所有(C)Microsoft Corporation。保留所有权利。
Pytorch 1.0.1 (通过PIP安装)
当我跑步时:
python setup.py安装
我得到:
...
File "C:\python36\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "C:\python36\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "C:\python36\lib\site-packages\setuptools\command\build_ext.py", line 199, in build_extension
_build_ext.build_extension(self, ext)
File "C:\python36\lib\distutils\command\build_ext.py", line 558, in build_extension
target_lang=language)
File "C:\python36\lib\distutils\ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "C:\python36\lib\distutils\_msvccompiler.py", line 501, in link
build_temp = os.path.dirname(objects[0])
IndexError: list index out of range
setup.py
setup(
...
install_requires=requirements,
ext_modules=[
CUDAExtension(
name="pointnet2._ext",
sources=_ext_sources,
extra_compile_args={
"cxx": ["-O2", "-I{}".format("{}/include".format(_ext_src_root))],
"nvcc": ["-O2", "-I{}".format("{}/include".format(_ext_src_root))],
},
)
],
...
)