ubuntu16.04上安装Python 3.5.X的pygame
2016-06-13 23:48
344 查看
安装依赖
用Mercurial下载pygame源码 (下了十几分钟,国内网渣渣!)
编译和安装pygame
检查是否安装好
也可运行python3后输入
sudo apt-get install mercurial python3-dev python3-numpy libav-tools \ libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \ libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
用Mercurial下载pygame源码 (下了十几分钟,国内网渣渣!)
hg clone https://bitbucket.org/pygame/pygame
编译和安装pygame
cd pygame python3 setup.py build sudo python3 setup.py install
检查是否安装好
python3 -c "import pygame"
也可运行python3后输入
import pygame
什么都没输出就证明安装pygame成功!
原文来自http://askubuntu.com/questions/708248/cannot-install-pygame-for-python-3-5-1
相关文章推荐
- python Decorator模式
- Python中Dict与Set对比总结
- win7+python3.4 +nltk搭建自然语言处理环境
- Python多重继承
- 树莓派红外反射传感器(Python程序)
- 静态方法和静态变量
- Python中LIst与Tuple的对比总结
- Python类的继承
- callback回调函数--python
- Python类成员方法与静态方法
- python3登录极路由并读取宽带帐号帐号密码.py
- python的datetime库笔记
- python函数学习笔记
- Python Socket
- Python类的属性
- Python包安装报错解决方法
- python实现线程池
- Python中的__name__和__main__含义详解
- python安装numpy函数库
- Python中的模块