pytorch3d
pytorch3d copied to clipboard
installation error on windows
Hi community,
I ran into errors with the installation of pytorch3D on windows.
environment
python 3.9.12 Cuda 11.3 PyTorch 1.12.1, 1.12.0, 1.11.0 (all failed) Microsoft Visual Studio 2019 ---- MSVC 14.28.29910
installation code
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
pip install "git+https://github.com/facebookresearch/pytorch3d.git"
log
I thought the key error is C:\software\Programming\Anaconda\envs\nurbsdiff_debug\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
Thank you in advance!
Can you run cl in the command prompt? If not, can you check the installation of visual studio and check you are using the correct command prompt for building with visual studio and nvcc?
Can you run
clin the command prompt? If not, can you check the installation of visual studio and check you are using the correct command prompt for building with visual studio and nvcc?
cl is not recognized in the command prompt. I added the "MSVC\14.28.29910\bin\Hostx64\x64" to path, and the cl command gives the output now like
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29915 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
It gives the error output when installing the pytorch3d
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
It's confusing that ver.14.28.29910 is used in pytorch3d installation, while the command window shows ver.19.28.29915 after typing 'cl'.
You shouldn't add it manually to the path. There should be dedicated ways to open a command prompt for visual studio. But in any case, this isn't a specific pytorch3d problem. To build pytorch3d on windows, you need to be able to build C++ and cuda files.