I'm trying to install pygame on Mac, and I've been able to install the dependencies, however I'm stuck at this step
pip install hg+http://bitbucket.org/pygame/pygame
The installation fails at the certain point:
fatal error: 'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>
How do I fix this, I'm pretty sure I have freetype (see below)?
I also noticed that even though I installed all the dependencies, I get notifications like these when compiling.
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
I ran into a similar problem and the following worked for me:
First, find the location of your systems freetype include files with
freetype-config --cflags
For me, the first result looked like:
-I/Users/username/anaconda/include/freetype2
Now rerun the pip install
but with the environment variable CFLAGS
set to result of the previous step. Again, for me, this looked like:
CFLAGS='-I/Users/username/anaconda/include/freetype2 pip install hg+http://bitbucket.org/pygame/pygame
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.