一 报错信息
最近安装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
还没有评论,来说两句吧...