安装pygame mac,python 2.7.9,问题是freetype和其他依赖项

时间:2015-03-20 19:14:25

标签: python macos pygame

我正在尝试在Mac上安装pygame,并且我已经能够安装依赖项,但是我仍然坚持这一步

pip install hg+http://bitbucket.org/pygame/pygame

安装在某一点失败:

fatal error: 'freetype/config/ftheader.h' file not found

#include <freetype/config/ftheader.h>

我如何解决这个问题,我很确定我有自由类型(见下文)?

我还注意到即使我安装了所有依赖项,我在编译时也会收到类似的通知。

SDL     : found 1.2.15
Framework SDL not found
FONT    : found
Framework SDL_ttf not found
IMAGE   : found
Framework SDL_image not found
MIXER   : found
Framework SDL_mixer not found
SMPEG   : found 0.4.5
Framework smpeg not found
Framework CoreMIDI found
Framework QuickTime found
PNG     : found
JPEG    : found
PORTMIDI: found
FREETYPE: found 2.5.3
AVFORMAT: not found
SWSCALE : not found

1 个答案:

答案 0 :(得分:0)

我遇到了类似的问题,以下内容对我有用:

首先,找到包含

的系统freetype包含文件的位置
freetype-config --cflags

对我来说,第一个结果如下:

-I/Users/username/anaconda/include/freetype2

现在重新运行pip install,但环境变量CFLAGS设置为上一步的结果。对我来说,这看起来像是:

CFLAGS='-I/Users/username/anaconda/include/freetype2 pip install hg+http://bitbucket.org/pygame/pygame
相关问题