python各种BUG报错解决

python各种BUG报错解决,第1张

报错1
python学习交流群:660193417###
Could not build atari-py: Command '['cmake', '..']' returned non-zero exit status 1..
 (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].)

遇到这个报错是在windows安装ray==1.0.0的时候,安装ray一切正常,安装ray[rllib]报错了!

安装atari-py,

pip install atari-py -i https://mirrors.aliyun.com/pypi/simple

报错:


解决:更换atari-py版本为0.2.9

pip install atari-py==0.2.9 -i https://mirrors.aliyun.com/pypi/simple

成功!

再安装ray[rllib]成功。

###################################################################

报错2
python学习交流群:660193417###
AttributeError: module 'contextlib' has no attribute 'nullcontext'

这个是由于python3.6 不支持 contxtlib。contxtlib在gym0.21.0中支持python3.7。

解决安装gym==0.20.0

pip install gym==0.20.0

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/790777.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-05
下一篇 2022-05-05

发表评论

登录后才能评论

评论列表(0条)

保存