Closed satyajit-ink closed 2 years ago
downgrading torch fixes it
%pip install torch==1.10.0+cu113 torchvision==0.11.0+cu113 torchtext==0.11.0 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
but i think using the nightly builds might work as well
Hi I'm facing the same issue on Colab. Running torch.__version__
gives me PyTorch version 1.11.0+cu113
.
Other than downgrading torch, is there any other solution to solve this problem?
Colab has just upgraded to PyTorch version 1.11.0, which the current PyTorch3D release doesn't have a build for. So now, running the tutorial means it will try to build from source, which fails after a couple of minutes because the current release (stable) of PyTorch3D is not compatible with PyTorch 1.11.0. (If you add --verbose to the pip install, you will see the error, specifically fatal error: TH/TH.h: No such file or directory
on a line #include <TH/TH.h>
.)
The incompatibility has been fixed on the main
branch of PyTorch3D. So I hope it will work (albeit with a very slow build from source) if you replace
!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'
with
!pip install 'git+https://github.com/facebookresearch/pytorch3d.git'
We hope to release another version of PyTorch3D very soon, which will fix this.
Actually, installing from main fails right now because of a problem with the console_scripts
specification in setup.py
. We'll fix soon.
Actually, installing from main fails right now because of a problem with the
console_scripts
specification insetup.py
. We'll fix soon.
This bit of the problem has just been fixed by 41c594ca. !pip install 'git+https://github.com/facebookresearch/pytorch3d.git' should now work.
(Although it is still very slow!)
Hi, is the original example supposed to work now as new version of pytorch3d 0.6.2 has been released? I am still getting the same error. Thank you
I'm afraid this isn't fixed yet. You still need to build from source in the tutorial notebooks. Yesterday's release does not include linux wheels, at least not yet. I have encountered difficulties in building a wheel for CUDA 11.1 / PyTorch 1.11.0 / Python 3.7, which corresponds to the current Colab environment.
The wheel for colab for the release (0.6.2) is now present, and the stable tag has been updated. This means the tutorials are expected to work fine on Colab without building from source.
I am getting an "Access denied" error from: https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1110/download.html
Running in google colab:
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1110/download.html
cashes with:
Looking in links: https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1110/download.html
ERROR: Could not find a version that satisfies the requirement pytorch3d (from versions: none)
ERROR: No matching distribution found for pytorch3d
@bykof That wheel doesn't exist. The linux wheels mainly exist to support Google Colab, which is on CUDA 11.1. They don't have versions built for dependencies older than Colab's, and they don't try to. Since you aren't using Colab, can you use conda, which is the binary distribution format for linux which we support properly?
@bottler I am actually using Google Colab…
Is Colab using CUDA 10.2 for you? Is that because you did something special?
It was CUDA 10.2, but after restarting my environment its 11.3 now o.O
pzy37_cu113_pyt1110
Now the installation worked:
py37_cu113_pyt1110
Looking in links: https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/download.html
Collecting pytorch3d
Downloading https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/pytorch3d-0.6.2-cp37-cp37m-linux_x86_64.whl (43.2 MB)
|████████████████████████████████| 43.2 MB 1.2 MB/s
This is confusing. I thought the cuda version was constant for the whole of colab, and at the moment I thought it was 11.1.
So I created a new colab notebook and entered: !nvcc --version
output was:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
You were right, it's 11.1, sorry for confusing you :)
@bottler Is pytorch3d expected to work on colab now? With:
import sys
import torch
pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
version_str="".join([
f"py3{sys.version_info.minor}_cu",
torch.version.cuda.replace(".",""),
f"_pyt{pyt_version_str}"
])
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
From https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md#3-install-wheels-for-linux I'm randomly getting on of:
Looking in links: https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/download.html
Collecting pytorch3d
Downloading https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/pytorch3d-0.6.2-cp37-cp37m-linux_x86_64.whl (43.2 MB)
|████████████████████████████████| 43.2 MB 1.2 MB/s
ERROR: Could not find a version that satisfies the requirement iopath (from pytorch3d) (from versions: none)
ERROR: No matching distribution found for iopath
or:
Looking in links: https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/download.html
Collecting pytorch3d
Downloading https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/pytorch3d-0.6.2-cp37-cp37m-linux_x86_64.whl (43.2 MB)
|████████████████████████████████| 43.2 MB 1.3 MB/s
ERROR: Could not find a version that satisfies the requirement fvcore (from pytorch3d) (from versions: none)
ERROR: No matching distribution found for fvcore
The tutorials are fine now. Look carefully at how they begin - there's a !pip install fvcore iopath
which you need first.
Hi, I am having the same issue trying to install the dependencies. I am following the colab examples about how to install the package:
import os
import sys
import torch
need_pytorch3d=False
try:
import pytorch3d
except ModuleNotFoundError:
need_pytorch3d=True
if need_pytorch3d:
if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"):
# We try to install PyTorch3D via a released wheel.
pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
version_str="".join([
f"py3{sys.version_info.minor}_cu",
torch.version.cuda.replace(".",""),
f"_pyt{pyt_version_str}"
])
!pip install fvcore iopath
!pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html
else:
# We try to install PyTorch3D from source.
!curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz
!tar xzf 1.10.0.tar.gz
os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0"
!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable
And this is the error I am getting:
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Building wheel for pytorch3d (setup.py) ... error
ERROR: Failed building wheel for pytorch3d
Running setup.py clean for pytorch3d
Failed to build pytorch3d
Installing collected packages: pytorch3d
error: subprocess-exited-with-error
× Running setup.py install for pytorch3d did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Running setup.py install for pytorch3d ... error
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pytorch3d
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Currently in colab i am using cuda version 11.8 and torch version 1.10.0+cu113
Is it possible that I am skipping something from the installation process like downgrading cuda maybe? Also I tried both, the stable version and the main branch version and the error keeps appearing. Thanks in advance for the help!
@MarinerZZ Please open a new issue for a new question. This issue is two years old and resolved.
Ok sorry!
Google Colab Example Notebooks have stopped working
Recently Colab upgraded to PyTorch 1.11.0 with Cuda 11.3, this has broken the example notebooks
and here's the output
Instructions To Reproduce the Issue:
Run any of the notebooks in the tutorial, for example: https://colab.research.google.com/github/facebookresearch/pytorch3d/blob/stable/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb
For torch version
1.11.0+cu113
in colab, the url should be https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py37_cu113_pyt1110/download.html which doesn't exist, also build from source is not working. This could be temporaily fixed by downgrading torch for now.