use*_*967 2 python pip openai-gym
我尝试跑步pip install gym==0.21.0
但出现了神秘的错误:
\nCollecting gym==0.21.0\n Using cached gym-0.21.0.tar.gz (1.5 MB)\n Preparing metadata (setup.py) ... error\n error: subprocess-exited-with-error\n \n \xc3\x97 python setup.py egg_info did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [1 lines of output]\n 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.\n [end of output]\n \n note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: metadata-generation-failed\n\n\xc3\x97 Encountered error while generating package metadata.\n\xe2\x95\xb0\xe2\x94\x80> See above for output.\n\nnote: This is an issue with the package mentioned above, not pip.\nhint: See above for details.\nRun Code Online (Sandbox Code Playgroud)\n可能是什么原因导致此错误?
\n根据https://github.com/openai的问题部分中的评论,这些是需要进行的更改 -
pip install setuptools==65.5.0 pip==21 # gym 0.21 installation is broken with more recent versionspip install wheel==0.38.0我遇到了同样的问题,经过上述操作后,问题得到了解决。