I saw that more people seem to have the same issue, but it was not resolved. I am trying to install Pytorch3D with Anaconda and got the following PackageNotFound error.
Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pytorch3d
Current channels:
- https://conda.anaconda.org/pytorch3d/win-64
- https://conda.anaconda.org/pytorch3d/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I have also tried using pip install 'git+https://github.com/facebookresearch/pytorch3d.git' and get the following:
C:\Users\Alexandra>pip install 'git+https://github.com/facebookresearch/pytorch3d.git'
ERROR: Invalid requirement: "'git+https://github.com/facebookresearch/pytorch3d.git'"
C:\Users\Alexandra>pip install git+https://github.com/facebookresearch/pytorch3d.git
Collecting git+https://github.com/facebookresearch/pytorch3d.git
Cloning https://github.com/facebookresearch/pytorch3d.git to c:\users\alexan~1\appdata\local\temp\pip-req-build-uspo7an4
Running command git clone -q https://github.com/facebookresearch/pytorch3d.git 'C:\Users\ALEXAN~1\AppData\Local\Temp\pip-req-build-uspo7an4'
ERROR: Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/facebookresearch/pytorch3d.git 'C:\Users\ALEXAN~1\AppData\Local\Temp\pip-req-build-uspo7an4'
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
I am on Windows 10, using python 3.8, PyTorch 1.5 and CUDA 10.2. I am very new to python, so I have no idea how to fix this (you can tell, that I've never installed from git before..) (please be lenient!) Thank you!
EDIT: Thank you for your answers. I did install Git and it got me a bit further, but still not completeing the build..
Also, interesting enough, when I run the commands
!pip install torch torchvision
!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'
in Google Collab it seems to work, but I cannot run it , let's say, in jupyter. Any more ideas?







https://github.com/facebookresearch/pytorch3d/blob/master/INSTALL.md
Install from local clone on Windows:
If you are using pre-compiled pytorch 1.4 and torchvision 0.5, you should make the following changes to the pytorch source code to successfully compile with Visual Studio 2019 (MSVC 19.16.27034) and CUDA 10.1.
Change python/Lib/site-packages/torch/include/csrc/jit/script/module.h
L466, 476, 493, 506, 536
-static constexpr * +static const *
Change python/Lib/site-packages/torch/include/csrc/jit/argument_spec.h
L190
-static constexpr size_t DEPTH_LIMIT = 128; +static const size_t DEPTH_LIMIT = 128;
Change python/Lib/site-packages/torch/include/pybind11/cast.h
L1449
-explicit operator type&() { return *(this->value); } +explicit operator type& () { return ((type)(this->value)); }
After patching, you can go to "x64 Native Tools Command Prompt for VS 2019" to compile and install
cd pytorch3d python3 setup.py install
After installing, verify whether all unit tests have passed
cd tests python3 -m unittest discover -p *.py