编程语言
首页 > 编程语言> > python各种BUG报错解决

python各种BUG报错解决

作者:互联网

报错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

标签:install,python,py,报错,atari,安装,BUG,ray
来源: https://www.cnblogs.com/xiaoxiongmao123/p/16200787.html