错误:aise DependencyNotInstalled( gym.error.DependencyNotInstalled: pygame is not installed, run 'pip install gym[classic_control]
理论上pip install gym[all]就行
接着就遇到了缺少box2d的bug
然后装box2d的时候又说要装swig,装swig又让装pcre
#以下是解决办法,参考
Mac安装gym
安装gym依赖
brew install cmake boost boost-python3 sdl2 swig wget
没有brew就先运行:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
这里有个问题是说Warning: /opt/homebrew/bin is not in your PATH.
没添加到环境里,所以没有brew命令
按照终端提示,继续执行
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/lmy/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
然后就好了,再执行brew install命令就行了。