pip install pytorch-quantization error

pip install pytorch-quantization error

码农世界 2024-05-29 前端 83 次浏览 0个评论

一 报错信息

最近安装pytorch-quantization报错,安装失败报错信息如下:

Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting pytorch-quantization
  Downloading pytorch-quantization-2.2.1.tar.gz (6.8 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "", line 36, in 
        File "", line 34, in 
        File "/tmp/pip-install-f9tw8c74/pytorch-quantization_ae408775160944c195742c752da0d2ed/setup.py", line 137, 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.
      This package is hosted on NVIDIA Python Package Index.
      This package can be installed as:
      ```
      $ pip install --no-cache-dir --extra-index-url https://pypi.nvidia.com pytorch-quantization
      ```
      ###########################################################################################
      [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.

二 解决方案

pip install --no-cache-dir --index-url https://pypi.nvidia.com --index-url https://pypi.org/simple pytorch-quantization==2.1.3

转载请注明来自码农世界,本文标题:《pip install pytorch-quantization error》

百度分享代码,如果开启HTTPS请参考李洋个人博客
每一天,每一秒,你所做的决定都会改变你的人生!

发表评论

快捷回复:

评论列表 (暂无评论,83人围观)参与讨论

还没有评论,来说两句吧...

Top