问题
(legion) zhouy24@RL-DSlab:~/zhouy24Files/legion/LEGION$ pip install gym0.20.0 # LEGION 项目兼容的版本
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting gym0.20.0
Using cached https://mirrors.aliyun.com/pypi/packages/f1/16/a421155206e7dc41b3a79d4e9311287b88c20140d567182839775088e9ad/gym-0.20.0.tar.gz (1.6 MB)
Preparing metadata (setup.py) … error
error: 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.
hint: See above for details.
解决
(legion) zhouy24@RL-DSlab:~/zhouy24Files/legion/LEGION$ pip install setuptools65.5.0 “wheel<0.40.0”
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting setuptools65.5.0
Downloading https://mirrors.aliyun.com/pypi/packages/41/82/7f54bbfe5c247a8c9f78d8d1d7c051847bcb78843c397b866dba335c1e88/setuptools-65.5.0-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 9.4 MB/s eta 0:00:00
Collecting wheel<0.40.0
Downloading https://mirrors.aliyun.com/pypi/packages/bd/7c/d38a0b30ce22fc26ed7dbc087c6d00851fb3395e9d0dac40bec1f905030c/wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: wheel, setuptools
Attempting uninstall: wheel
Found existing installation: wheel 0.42.0
Uninstalling wheel-0.42.0:
Successfully uninstalled wheel-0.42.0
Attempting uninstall: setuptools
Found existing installation: setuptools 69.0.0
Uninstalling setuptools-69.0.0:
Successfully uninstalled setuptools-69.0.0
Successfully installed setuptools-65.5.0 wheel-0.38.4
(legion) zhouy24@RL-DSlab:~/zhouy24Files/legion/LEGION$ pip install gym0.20.0 # LEGION 项目兼容的版本
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting gym0.20.0
Using cached https://mirrors.aliyun.com/pypi/packages/f1/16/a421155206e7dc41b3a79d4e9311287b88c20140d567182839775088e9ad/gym-0.20.0.tar.gz (1.6 MB)
Preparing metadata (setup.py) … done
Requirement already satisfied: numpy>=1.18.0 in /home/zhouy24/miniconda3/envs/legion/lib/python3.8/site-packages (from gym0.20.0) (1.24.4)
Requirement already satisfied: cloudpickle>=1.2.0 in /home/zhouy24/miniconda3/envs/legion/lib/python3.8/site-packages (from gym0.20.0) (1.3.0)
Building wheels for collected packages: gym
Building wheel for gym (setup.py) … done
Created wheel for gym: filename=gym-0.20.0-py3-none-any.whl size=1650451 sha256=68fd24e32e100fde9f617f07444cab9dfd9f8f739de45fbcaff03a94fac2d890
Stored in directory: /home/zhouy24/.cache/pip/wheels/fb/80/d3/06728d5e302fb916b67c3157fe097d147fb578fac61d6ebf3c
Successfully built gym
Installing collected packages: gym
Successfully installed gym-0.20.0