build\box
Closed this issue · 0 comments
你好,
当我执行
cd build/box
python setup.py install
时,报错:
running install
D:\anaconda3\envs\py3.9\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
D:\anaconda3\envs\py3.9\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing box.egg-info\PKG-INFO
writing dependency_links to box.egg-info\dependency_links.txt
writing top-level names to box.egg-info\top_level.txt
reading manifest file 'box.egg-info\SOURCES.txt'
writing manifest file 'box.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
D:\anaconda3\envs\py3.9\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'box' extension
Emitting ninja build file F:\4.17_LSSANet-main\LSSANet-main\build\box\build\temp.win-amd64-cpython-39\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
D:\vs_buildtools\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\anaconda3\envs\py3.9\lib\site-packages\torch\lib /LIBPATH:D:\anaconda3\envs\py3.9\libs /LIBPATH:D:\anaconda3\envs\py3.9 /LIBPATH:D:\anaconda3\envs\py3.9\PCbuild\amd64 /LIBPATH:D:\vs_buildtools\BuildTools\VC\Tools\MSVC\14.35.32215\lib\x64 "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" c10.lib torch.lib torch_cpu.lib torch_python.lib /EXPORT:PyInit_box F:\4.17_LSSANet-main\LSSANet-main\build\box\build\temp.win-amd64-cpython-39\Release\box.obj /OUT:build\lib.win-amd64-cpython-39\box.cp39-win_amd64.pyd /IMPLIB:F:\4.17_LSSANet-main\LSSANet-main\build\box\build\temp.win-amd64-cpython-39\Release\box.cp39-win_amd64.lib
正在创建库 F:\4.17_LSSANet-main\LSSANet-main\build\box\build\temp.win-amd64-cpython-39\Release\box.cp39-win_amd64.lib
和对象 F:\4.17_LSSANet-main\LSSANet-main\build\box\build\temp.win-amd64-cpython-39\Release\box.cp39-win_amd64.exp
box.obj : error LNK2001: 无法解析的外部符号 "public: long * __cdecl at::TensorBase::data_ptr(void)const " (??$data_ptr@J@TensorBase@at@@QEBAPEAJXZ)
build\lib.win-amd64-cpython-39\box.cp39-win_amd64.pyd : fatal error LNK1120: 1 个无法解析的外部命令
error: command 'D:\vs_buildtools\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\link.exe' failed with exit code 1120
我的torch版本是:1.13.1+cu17
请问应该如何解决这个问题?
期待你的回复,感谢!