繁体   English   中英

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

[英]Installing pygame mac, python 2.7.9, issues with freetype and other dependencies

我正在尝试在Mac上安装pygame,并且已经能够安装依赖项,但是在此步骤中我被困住了

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

安装在某些时候失败:

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

#include <freetype/config/ftheader.h>

我要如何解决这个问题,我很确定自己具有freetype(请参见下文)?

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

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

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

首先,找到您的系统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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM