Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A compilation problem about setup.py #10

Open
Richard9797 opened this issue Feb 28, 2022 · 0 comments
Open

A compilation problem about setup.py #10

Richard9797 opened this issue Feb 28, 2022 · 0 comments

Comments

@Richard9797
Copy link

This problem occurs when I compile

running install
running bdist_egg
running egg_info
writing add2.egg-info\PKG-INFO
writing dependency_links to add2.egg-info\dependency_links.txt
writing top-level names to add2.egg-info\top_level.txt
reading manifest file 'add2.egg-info\SOURCES.txt'
writing manifest file 'add2.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
D:\miniconda3\envs\torch-gpu\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'add2' extension
Emitting ninja build file D:\git-bash\daima\NN-CUDA-Example\build\temp.win-amd64-3.8\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2.git.kitware.jobserver-1
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\miniconda3\envs\torch-gpu\lib\site-
packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib/x64" /LIBPATH:D:\miniconda3\envs\torch-gpu\libs /LIBPATH:D:\miniconda3\envs\torch-gpu\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft
Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" c10.lib torch.lib tor
ch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EXPORT:PyInit_add2 D:\git-bash\daima\NN-CUDA-Example\build\temp.win-amd64-3.8\Release\pytorch/add2_ops.obj D:\git-bash\daima\NN-CUDA-Example\b
uild\temp.win-amd64-3.8\Release\kernel/add2_kernel.obj /OUT:build\lib.win-amd64-3.8\add2.cp38-win_amd64.pyd /IMPLIB:D:\git-bash\daima\NN-CUDA-Example\build\temp.win-amd64-3.8\Release\pytorch\add2.cp38-win_amd64.lib
LINK : fatal error LNK1181: 无法打开输入文件“D:\git-bash\daima\NN-CUDA-Example\build\temp.win-amd64-3.8\Release\pytorch\add2_ops.obj”
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1181

The environment configuration is as follows:
pytorch1.8.1+cuda11.1
python3.8

How to solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant