您的位置:首页 > 编程语言 > Python开发

How to install Pygame for Python 3.4 on Ubuntu 14.04(转)

2015-03-07 17:55 966 查看

First run this to install dependencies:

sudo apt-get install mercurial python3-dev python3-numpy \
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 libfreetype6-dev

Then download the source for pygame:

First install mercurial if you dont have it installed:

sudo apt-get install mercurial

then:

hg clone https://bitbucket.org/pygame/pygame

Now build and install pygame for Python 3.4:


cd pygame
python3 setup.py build
sudo python3 setup.py install


Additional comments:

The only version of Python3 I had installed was 3.4 if you have other versions
you might have to be more specific.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: