facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.49k stars 1.28k forks source link

windows11 install problem #1790

Open jjhaaa opened 2 months ago

jjhaaa commented 2 months ago

hi, i use cuda 11.3 torch 1.12.1 and install pytorch3d0.7.1 in windows11 t failed with this:

(d:\anaconda3\envs\torch3d\test1) D:\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1>python setup.py install
running install
d:\anaconda3\envs\torch3d\test1\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
d:\anaconda3\envs\torch3d\test1\lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  self.initialize_options()
running bdist_egg
running egg_info
writing pytorch3d.egg-info\PKG-INFO
writing dependency_links to pytorch3d.egg-info\dependency_links.txt
writing entry points to pytorch3d.egg-info\entry_points.txt
writing requirements to pytorch3d.egg-info\requires.txt
writing top-level names to pytorch3d.egg-info\top_level.txt
reading manifest file 'pytorch3d.egg-info\SOURCES.txt'
adding license file 'LICENSE'
adding license file 'LICENSE-3RD-PARTY'
writing manifest file 'pytorch3d.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'pytorch3d._C' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\anaconda3
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\ball_query
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\blending
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\compositing
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\face_areas_normals
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\gather_scatter
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\interp_face_attrs
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\iou_box3d
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\knn
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\marching_cubes
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\mesh_normal_consistency
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\packed_to_padded_tensor
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\point_mesh
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\points_to_volumes
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\pulsar
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\pulsar\cuda
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\pulsar\host
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\pulsar\pytorch
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\rasterize_coarse
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\rasterize_meshes
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\rasterize_points
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\sample_farthest_points
creating build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\sample_pdf
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\nvcc" -c D:\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\ball_query\ball_query.cu -o build\temp.win-amd64-cpython-39\Release\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc\ball_query\ball_query.obj -ID:\anaconda3\envs\torch3d\test1\Lib\site-packages\pytorch3d-0.7.1\pytorch3d\csrc -ID:\code\cub-1.11.0\cub-1.11.0 -Id:\anaconda3\envs\torch3d\test1\lib\site-packages\torch\include -Id:\anaconda3\envs\torch3d\test1\lib\site-packages\torch\include\torch\csrc\api\include -Id:\anaconda3\envs\torch3d\test1\lib\site-packages\torch\include\TH -Id:\anaconda3\envs\torch3d\test1\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -Id:\anaconda3\envs\torch3d\test1\include -Id:\anaconda3\envs\torch3d\test1\Include "-ID:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-ID:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-ID:\Windows Kits\10\include\10.0.22000.0\ucrt" "-ID:\Windows Kits\10\include\10.0.22000.0\shared" "-ID:\Windows Kits\10\include\10.0.22000.0\um" "-ID:\Windows Kits\10\include\10.0.22000.0\winrt" "-ID:\Windows Kits\10\include\10.0.22000.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_52,code=compute_52 -gencode=arch=compute_52,code=sm_52 --use-local-env
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.3\\bin\\nvcc.exe' failed with exit code 1

my environment: 1714496440248

bottler commented 2 months ago

Installation on windows is really complicated and hard to get right. I recommend looking through recent issues where people have succeeded. Is pytorch with cuda actually working in your environment? You don't seem to have cudatoolkit or pytorch-cuda in the environment, so I don't actually understand what the environment is or how you got it. You also don't have pytorch3d's other dependencies, so I don't know why setup.py is calling nvcc, it should have errored earlier.

jjhaaa commented 2 months ago

在 Windows 上安装真的很复杂,很难正确。我建议查看最近人们成功的问题。带有 cuda 的 pytorch 真的在您的环境中工作吗?环境中似乎没有 cudatoolkit 或 pytorch-cuda,所以我实际上不明白环境是什么或您是如何得到它的。你也没有pytorch3d的其他依赖项,所以我不知道为什么 setup.py 调用nvcc,它应该早点出错。

My environment is built like this: 1.conda create -n test1 python=3.9 2.conda activate test1 3.pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113 4.install cub-1.11.0 and cuda_11.3.0_465.89_win10 5.Configure environment variables

1714640834620

bottler commented 2 months ago

Can you install all the dependencies as conda packages similar to what we recommend in INSTALL.md ? You are missing various things related to cuda and we really can't help you get them any other way.