[英]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.