安装pygame[ubuntu18.04lts python3.6]

安装pygame[ubuntu18.04lts python3.6]

sudo pip3 install pygame(已经安装了pip)

 

注:之前按照书里写的,先安装pygame依赖的库,但是之后的pygame还是一直无法正确安装。执行

sudo apt-get install python3-dev mercurial

都会显示mercurial的版本已经是最新的

安装pygame[ubuntu18.04lts python3.6]

 安装pygame[ubuntu18.04lts python3.6]

 安装pygame[ubuntu18.04lts python3.6]

 后来发现mercurial只支持python2.7

安装pygame[ubuntu18.04lts python3.6]

 

最后,在网上找到其他在py3.x下安装pygame的方法,解决了:)

安装pygame[ubuntu18.04lts python3.6]