conda create -n pytorch3d_env python=3.10
conda activate pytorch3d_env
conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -c conda-forge scikit-image matplotlib imageio plotly opencv ninja
git clone GitHub - facebookresearch/pytorch3d: PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
cd pytorch3d
python setup.py clean
python setup.py install
these are all the codes i used to install it
and this is the error ( the original error was much longer i just copied the last part ):
cl : Command line warning D9002 : ignoring unknown option ‘-std=c++17’
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File “C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\torch\utils\cpp_extension.py”, line 2107, in _run_ninja_build
subprocess.run(
File “C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\subprocess.py”, line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Administrator\pytorch3d\setup.py", line 144, in <module>
setup(
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
return run_commands(dist)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
dist.run_commands()
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\dist.py", line 967, in run_command
super().run_command(command)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\command\develop.py", line 34, in run
self.install_for_development()
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\command\develop.py", line 111, in install_for_development
self.run_command('build_ext')
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\dist.py", line 967, in run_command
super().run_command(command)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\command\build_ext.py", line 91, in run
_build_ext.run(self)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run
self.build_extensions()
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\torch\utils\cpp_extension.py", line 870, in build_extensions
build_ext.build_extensions(self)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 479, in build_extensions
self._build_extensions_serial()
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 505, in _build_extensions_serial
self.build_extension(ext)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\command\build_ext.py", line 252, in build_extension
_build_ext.build_extension(self, ext)
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 560, in build_extension
objects = self.compiler.compile(
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\torch\utils\cpp_extension.py", line 842, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\torch\utils\cpp_extension.py", line 1783, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "C:\ProgramData\miniconda3\envs\pytorch3d_env\lib\site-packages\torch\utils\cpp_extension.py", line 2123, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.