使用pip安装PyGame的步骤
>安装构建依赖项(在linux上):
sudo apt-get build-dep python-pygame
>安装mercurial使用hg(在linux上):
sudo apt-get install mercurial
pip install hg+http://bitbucket.org/pygame/pygame
如果上面给出freetype-config:not found错误(在Linux上),然后尝试sudo apt-get安装libfreetype6-dev,然后重复3。
替代方法:
# Grab source
hg clone https://bitbucket.org/pygame/pygame
# Finally build and install
cd pygame
python setup.py build
sudo python setup.py install
替代方法(适用于Brew用户):
brew install pygame