Skip to content

❓ [Question] Cannot install torch-tensorrt package #1188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
myxzlpltk opened this issue Jul 19, 2022 · 9 comments
Closed

❓ [Question] Cannot install torch-tensorrt package #1188

myxzlpltk opened this issue Jul 19, 2022 · 9 comments
Assignees
Labels
channel: windows bugs, questions, & RFEs around Windows question Further information is requested

Comments

@myxzlpltk
Copy link

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.
@myxzlpltk myxzlpltk added the question Further information is requested label Jul 19, 2022
@narendasan narendasan added the channel: windows bugs, questions, & RFEs around Windows label Jul 19, 2022
@narendasan
Copy link
Collaborator

Follow these instructions to build torch-tensorrt for windows #1058

@fatemebafghi
Copy link

fatemebafghi commented Sep 26, 2022

Screenshot from 2022-09-26 10-11-59
Screenshot from 2022-09-26 10-13-12
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 "", line 2, in
File "", line 34, in
File "/tmp/pip-install-73y1ow5c/torch-tensorrt_88f670af2a484cdfa6dc96e2467ce1ba/setup.py", line 125, in
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.

How can I fix it?

@gaurav274
Copy link

gaurav274 commented Oct 12, 2022

This fixed it for me. #1371 (comment)

@IamExperimenting
Copy link

@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.

@eldarkurtic
Copy link

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

@pbamotra
Copy link

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

@fmatulic
Copy link

@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.

@Deco354
Copy link

Deco354 commented Jan 4, 2024

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?

@cooperdk
Copy link

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.

@pytorch pytorch locked as resolved and limited conversation to collaborators Feb 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
channel: windows bugs, questions, & RFEs around Windows question Further information is requested
Projects
None yet
Development

No branches or pull requests

10 participants