❓ [Question] Cannot install torch-tensorrt package
Hi! Can someone explain why this is error
(tf-gpu-11.6) C:\Users\myxzlpltk>pip install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases
Looking in links: https://github.com/NVIDIA/Torch-TensorRT/releases
Collecting torch-tensorrt
Using cached 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 "C:\Users\myxzlpltk\AppData\Local\Temp\pip-install-t86xj3rx\torch-tensorrt_a472ada85c9e492d8f4d7d614046053d\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.
Follow these instructions to build torch-tensorrt for windows https://github.com/pytorch/TensorRT/pull/1058
I am getting the same error when I want to install torch-tensorrt in ubuntu
I have installed pytroch, nvidia-pyindex, and nvidia-tensorrt
when I use the command " pip3 install torch-tensorrt==1.1.0 -f https://github.com/pytorch/tensorrt/releases/expanded_assests/1.1.0" or "pip3 install torch-tensorrt==1.1.0 -f https://github.com/pytorch/tensorrt/releases ", I get the following error:
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Looking in links: https://github.com/pytorch/tensorrt/releases/expanded_assests/1.1.0 ERROR: Could not find a version that satisfies the requirement torch-tensorrt==1.1.0 (from versions: 0.0.0, 0.0.0.post1) ERROR: No matching distribution found for torch-tensorrt==1.1.0
and when I use this command "pip3 install torch-tensorrt" -f https://github.com/pytorch/tensorrt/releases/expanded_assests/" according to this link https://pytorch.org/TensorRT/getting_started/installation.html#installation, I get the following error Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Looking in links: https://github.com/pytorch/tensorrt/releases/expanded_assests/ 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 "
$ 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.
How can I fix it?
This fixed it for me. https://github.com/pytorch/TensorRT/issues/1371#issuecomment-1256035010
@narendasan why you're not giving the exact installation process? it would be really helpful if you give the installation requirements,
Python version Cuda version support packages version tensorrt version torch_tensorrt version Its becoming challenging for me and everyone to install torch_tensorrt and use it.
The command for torch-tensorrt installation at official PyTorch docs page is misleading because it is presented as:
pip3 install torch-tensorrt==<VERSION> -f https://github.com/pytorch/TensorRT/releases/expanded_assets/<VERSION>
implying that you need to type the <VERSION> (e.g. 1.2.0) two times in the same format, which is what users above are trying to do. The correct format for this command is:
pip3 install torch-tensorrt==<VERSION> -f https://github.com/pytorch/TensorRT/releases/expanded_assets/v<VERSION>
Notice prepended letter v in v<VERSION> at the very end. So if you want to install 1.2.0 version, you would use:
pip3 install torch-tensorrt==1.1.0 -f https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.1.0
pip3 install torch-tensorrt==1.1.0 -f https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.1.0
Leads to this error
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Looking in links: https://github.com/pytorch/TensorRT/releases/expanded_assets/v1.1.0
ERROR: Could not find a version that satisfies the requirement torch-tensorrt==1.1.0 (from versions: 0.0.0, 0.0.0.post1)
ERROR: No matching distribution found for torch-tensorrt==1.1.0
@narendasan why you're not giving the exact installation process? it would be really helpful if you give the installation requirements,
Python version Cuda version support packages version tensorrt version torch_tensorrt version Its becoming challenging for me and everyone to install torch_tensorrt and use it.
+1 for this request. I don't understand why this issue was closed, since neither the error message returned by pip mentions that torch_tensorrt needs to be compiled on Windows (if that's the case), nor does the provided link present clear and easy-to-follow instructions on how to do this. I.e. the issue hasn't been resolved.
pip3 install torch-tensorrt==<VERSION> -f https://github.com/pytorch/TensorRT/releases/expanded_assets/<VERSION>Leads to this error
@pbamotra I've the same issue, did you find a solution for this?
Geez. Why the F**k not just build this for each version of cuda, torch, and python like other serious tools? Especially when it is such an odd way to build a module.