当前位置: 首页 > news >正文

解决:error: subprocess-exited-with-error 的问题

系统和配置:
ubuntu20.04
python3.10
torch2.5.1

pip install时报错如下
(实际指令是:pip3 install -r drl_grasping/python_requirements.txt

Collecting python-xlib>=0.17 (from pynput==1.7.6->-r drl_grasping/python_requirements.txt (line 6))Downloading python_xlib-0.33-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting gym<0.20,>=0.17 (from stable-baselines3==1.4.0->stable-baselines3[extra]==1.4.0->-r drl_grasping/python_requirements.txt (line 10))Downloading gym-0.19.0.tar.gz (1.6 MB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 1.3 MB/s eta 0:00:00Preparing metadata (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py egg_info did not run successfully.│ exit code: 1╰─> [1 lines of output]error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.[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.

错误解决方法:网上说是升setuptools的版本

pip install --upgrade setuptools

但我把setuptools从69.5.1升级到75.6.0以后还是报错。。

pip install --upgrade setuptools
Requirement already satisfied: setuptools in /home/xj/anaconda3/envs/py310/lib/python3.10/site-packages (69.5.1)
Collecting setuptoolsUsing cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB)
Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptoolsAttempting uninstall: setuptoolsFound existing installation: setuptools 69.5.1Uninstalling setuptools-69.5.1:Successfully uninstalled setuptools-69.5.1
Successfully installed setuptools-75.6.0

正确解决方法:降setuptools的版本到58.0.0

pip install setuptools==58
pip install setuptools==58
Collecting setuptools==58Downloading setuptools-58.0.0-py3-none-any.whl.metadata (4.9 kB)
Downloading setuptools-58.0.0-py3-none-any.whl (816 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 816.3/816.3 kB 1.7 MB/s eta 0:00:00
Installing collected packages: setuptoolsAttempting uninstall: setuptoolsFound existing installation: setuptools 75.6.0Uninstalling setuptools-75.6.0:Successfully uninstalled setuptools-75.6.0
Successfully installed setuptools-58.0.0

没问题了

Collecting python-xlib>=0.17 (from pynput==1.7.6->-r drl_grasping/python_requirements.txt (line 6))Using cached python_xlib-0.33-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting gym<0.20,>=0.17 (from stable-baselines3==1.4.0->stable-baselines3[extra]==1.4.0->-r drl_grasping/python_requirements.txt (line 10))Using cached gym-0.19.0.tar.gz (1.6 MB)Preparing metadata (setup.py) ... done
Requirement already satisfied: torch>=1.8.1 in /home/xj/anaconda3/envs/py310/lib/python3.10/site-packages (from stable-baselines3==1.4.0->stable-baselines3[extra]==1.4.0->-r drl_grasping/python_requirements.txt (line 10)) (2.5.1)
Requirement already satisfied: cloudpickle in /home/xj/anaconda3/envs/py310/lib/python3.10/site-packages (from stable-baselines3==1.4.0->stable-baselines3[extra]==1.4.0->-r drl_grasping/python_requirements.txt (line 10)) (3.1.0)
Requirement already satisfied: setuptools in /home/xj/anaconda3/envs/py310/lib/python3.10/site-packages (from trimesh==3.9.35->-r drl_grasping/python_requirements.txt (line 12)) (58.0.0)
Requirement already satisfied: opencv-python in /home/xj/anaconda3/envs/py310/lib/python3.10/site-packages (from stable-baselines3[extra]==1.4.0->-r drl_grasping/python_requirements.txt (line 10)) (4.10.0.84)
http://www.lryc.cn/news/500013.html

相关文章:

  • 使用腾讯混元(HunYuanVideo)视频模型FP8量化版本来生成绅士动画,模型体积30G,8G甜品卡可玩,2秒视频需要15分钟
  • 使用Ancona安装node,安装vue
  • 如何“安装Android SDK“?
  • 天童教育:提升孩子的语言表达能力
  • Node.js中JWT的token完整生命周期管理:从生成到销毁
  • Kotlin报错:lateinit property xxx has not been initialized
  • debian编译失败
  • flink-connector-mysql-cdc:03 mysql-cdc常见问题汇总
  • JSP技术发展现状
  • 浏览器同源策略、跨域、跨域请求,服务器处理没、跨域解决方案
  • flink-connector-mysql-cdc:02 mysql-cdc高级扩展
  • Couchbase 简介
  • 我们来学mysql -- 事务并发之幻读(原理篇)
  • Ubuntu Linux 图形界面工具管理磁盘分区和文件系统(八)
  • Eclipse IDE 各个版本的用途和区别
  • 国产GPU中,VLLM0.5.0发布Qwen2.5-14B-Instruct-GPTQ-Int8模型,请求返回结果乱码
  • 在 Vue 3 中实现点击按钮后禁止浏览器前进或后退
  • Linux:软硬链接
  • Delphi XE 安卓Web开发 错误:net::ERR_CLEARTEXT_NOT_PERMITTED
  • 深入理解malloc与vector:内存管理的对比
  • 多个输入框联合搜索
  • 笔记03----NeurIPS2024 涨点!SSA:用于语义分割的语义和空间自适应像素级分类器(即插即用)
  • 自定义比较函数 down 作为 sort 函数的参数实现数组元素从大到小排序
  • 在 Spring Boot 中使用 JPA(Java Persistence API)进行数据库操作
  • 简单聊聊PLT和GOT
  • FaRM译文
  • 用vue框架写一个时钟的页面
  • HTML表单-第二部分
  • PyQt5:一个逗号引发的闪退血案
  • AI智能体Prompt预设词指令大全+GPTs应用使用