61581229 发表于 2015-12-3 11:09:58

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



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-devlibportmidi-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.
页: [1]
查看完整版本: How to install Pygame for Python 3.4 on Ubuntu 14.04(转)