Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "<string>", line 36, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\ADM\AppData\Local\Temp\pip-install-spql4we8\nvidia-tensorrt_eed04c700b0b4775b19b3e108a414888\setup.py", line 150, 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. This package is hosted on NVIDIA Python Package Index. This package can be installed as: ``` $ pip install nvidia-pyindex $ pip install nvidia-tensorrt ``` ########################################################################################### [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.
时间: 2024-02-14 21:15:49 浏览: 40
这个错误是由于安装nvidia-tensorrt包时出现了问题,建议按照错误信息中给出的方式安装nvidia-pyindex和nvidia-tensorrt,即先运行以下命令安装nvidia-pyindex:
```
$ pip install nvidia-pyindex
```
然后再运行以下命令安装nvidia-tensorrt:
```
$ pip install nvidia-tensorrt
```
如果还是无法解决问题,可以尝试升级pip或者使用conda进行安装。
相关问题
Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully.
这个错误通常表示在运行 `python setup.py egg_info` 时出现了问题。可能有几个原因导致此错误:
1. 缺少依赖项:确保您的环境中已安装了项目所需的所有依赖项。您可以通过运行 `pip install -r requirements.txt` 来安装所需的依赖项。
2. Python 版本问题:某些项目可能需要特定版本的Python才能正常工作。请检查项目的要求并确保您正在使用正确的Python版本。
3. 网络问题:有时,由于网络问题,无法下载所需的依赖项。您可以尝试使用代理或切换到稳定的网络连接来解决此问题。
4. 错误的 setup.py 文件:确认您的 `setup.py` 文件是否正确配置,并且没有语法或其他错误。
如果上述解决方法都无法解决问题,您可以尝试在交互式模式下运行 `python setup.py egg_info`,以便获得更具体的错误消息来帮助您诊断问题。
Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
引用提供了另一种错误信息,指出在安装weditor时,执行了python setup.py egg_info命令也没有成功运行。这次的错误信息显示缺少Cython模块。可能的解决办法是先安装Cython模块,然后再尝试安装weditor。你可以尝试运行pip install Cython命令来安装Cython模块,然后再运行pip install weditor命令来安装weditor。提供了另一个错误信息,指出在安装virtualenvwrapper时,执行了python setup.py egg_info命令也没有成功运行。错误信息显示缺少setuptools模块。解决办法是先安装setuptools模块,然后再尝试安装virtualenvwrapper。你可以尝试运行pip install --upgrade setuptools命令来安装或升级setuptools模块,然后再运行pip install virtualenvwrapper命令来安装virtualenvwrapper。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [pip install weditor 出错](https://blog.csdn.net/moso_wang/article/details/123376700)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [安装cython_bbox报错解决办法:Preparing metadata (setup.py)... error error: subprocess-exited-with-error](https://blog.csdn.net/li1873997/article/details/129490911)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [pip intall 出现 error: subprocess-exited-with-error 错误的解决办法](https://blog.csdn.net/Jackfled/article/details/127046255)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]