🐛 [Bug] Encountered bug when using Torch-TensorRT
Bug Description
I can't install TensorRT using pip install on Ubuntu 20.04 in a virtual environment.
To Reproduce
Steps to reproduce the behavior:
- Install tensorrt, etc. https://pytorch.org/TensorRT/getting_started/installation.html#installation
- pip3 install nvidia-pyindex
- pip3 install nvidia-tensorrt
- pip3 install torch-tensorrt -f https://github.com/pytorch/TensorRT/releases
pip install torch-tensorrt -f https://github.com/pytorch/tensorrt/releases
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Looking in links: https://github.com/pytorch/tensorrt/releases
Collecting torch-tensorrt
Downloading torch-tensorrt-0.0.0.post1.tar.gz (9.0 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-pd1uq46e/torch-tensorrt_c4b37a4bd4a440869a54423c227a1651/setup.py", line 125, in <module>
raise RuntimeError(open("ERROR.txt", "r").read())
RuntimeError:
###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
To install Torch-TensorRT please run the following command:
$ pip install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases
###########################################################################################
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Expected behavior
I would not expect it to throw an error since I follow the instructions, and I have installed TensorRT correctly, since I can convert models from torch to tensorrt using MMLabs interface.
Environment
- Torch-TensorRT Version (e.g. 1.0.0):
- PyTorch Version: 1.12.1
- OS (e.g., Linux): Ubuntu 20.04
- How you installed PyTorch (
conda,pip,libtorch, source): conda - Build command you used (if compiling from source): Used .tar installation guide when I installed TENSORRT and CUDANN.
- Python version: 3.9
- CUDA version: 11.7
- GPU models and configuration: Nvidia RTX 3070
Additional context
Pip packages:
Package Version
------------------------- ----------
brotlipy 0.7.0
certifi 2022.9.14
cffi 1.15.1
charset-normalizer 2.1.1
cryptography 37.0.4
idna 3.4
mkl-fft 1.3.1
mkl-random 1.2.2
mkl-service 2.4.0
numpy 1.23.1
nvidia-cublas-cu11 2022.4.8
nvidia-cublas-cu117 11.10.1.25
nvidia-cuda-runtime-cu11 2022.4.25
nvidia-cuda-runtime-cu117 11.7.60
nvidia-cudnn-cu11 2022.5.19
nvidia-cudnn-cu116 8.4.0.27
nvidia-pyindex 1.0.9
nvidia-tensorrt 8.4.3.1
Pillow 9.2.0
pip 22.2.2
pycparser 2.21
pyOpenSSL 22.0.0
PySocks 1.7.1
requests 2.28.1
setuptools 65.3.0
six 1.16.0
torch 1.12.1
torchaudio 0.12.1
torchvision 0.13.1
typing_extensions 4.3.0
urllib3 1.26.11
wheel 0.37.1
Having the same issue!
Also followed https://github.com/pytorch/TensorRT/issues/1026#issuecomment-1119561746 and tried explicitly the combination torch==1.10.0 torch-tensorrt==1.0.0.
For pip install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases I get the same error message from above (https://github.com/pytorch/TensorRT/issues/1371#issue-1383487444).
With specified version 1.0.0:
pip install torch-tensorrt==1.0.0 -f https://github.com/NVIDIA/Torch-TensorRT/releases
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Looking in links: https://github.com/NVIDIA/Torch-TensorRT/releases
ERROR: Could not find a version that satisfies the requirement torch-tensorrt==1.0.0 (from versions: 0.0.0, 0.0.0.post1)
ERROR: No matching distribution found for torch-tensorrt==1.0.0
It seems github is not returning a response with assets expanded, and here is a workaround
pip install torch-tensorrt==1.1.0 --find-links https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.1.0
Unfortunately, for other versions you have to modify both version tags in the command above.
Thanks, I'm closing this issue as it is resolved.
@dscho15 I'm not a maintainer of this repo but I think you should leave this issue open, since it needs to be properly resolved i.e. update the installation instructions in the readme.
Yeah seems like Github has changed the link structure for the release page and links are not directly accessible anymore without going to the specific stub for a release's artifacts. We are looking into the requirements to setup and maintain a index but in the meantime documentation has been updated