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

Cannot install pytorch due to VS build tools #1890

Open
wjh19990923 opened this issue Oct 10, 2024 · 2 comments
Open

Cannot install pytorch due to VS build tools #1890

wjh19990923 opened this issue Oct 10, 2024 · 2 comments

Comments

@wjh19990923
Copy link

I followed the same step that I did for past computers and retry them on the new computer (win11). At the final step of pip install -e . , there is a unexpected error

C:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\bin\nvcc -c C:\Users\rsurbeck\Documents\dupla\pytorch3d\pytorch3d\csrc\ball_query\ball_query.cu -o build\temp.win-amd64-cpython-39\Release\Users\rsurbeck\Documents\dupla\pytorch3d\pytorch3d\csrc\ball_query\ball_query.obj -IC:\Users\rsurbeck\Documents\dupla\pytorch3d\pytorch3d\csrc -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\include -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\lib\site-packages\torch\include -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\lib\site-packages\torch\include\TH -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\lib\site-packages\torch\include\THC -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\include -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\include -IC:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.41.34120\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.41.34120\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.26100.0\\cppwinrt" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --use-local-env
    C:\Users\rsurbeck\AppData\Local\anaconda3\envs\pytorch3d\include\crt/host_config.h(153): fatal error C1189: #error:  -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
    ball_query.cu
    error: command 'C:\\Users\\rsurbeck\\AppData\\Local\\anaconda3\\envs\\pytorch3d\\bin\\nvcc' failed with exit code 2
    [end of output]

but I indeed install MSVC (same setting as my previous computer) with v143 which is in 2022.

@harryseely
Copy link

Hi @wjh19990923 try the following setup method mentioned in the post below:

#1892 (comment)

@FurkanGozukara
Copy link

follow this tutorial installed on windows via pip install git on python 3.10 venv

https://youtu.be/DrhUHnYfwC0

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

3 participants