2014-04-30 67 views
0

我試圖安裝pygame的對我的MacBook Pro運行小牛。的Python 2.7/3 pygame的安裝

我按照下面的教程,以便安裝pygame的: 「http://dudeslife.com/blog/2014/programming/installing-python-3-3-3-pygame-on-os-x-mavericks/

我已經從跟隨方向下python3和Python 2.7安裝pygame的。

不幸的是,當我運行「命令PIP安裝汞柱+ http://bitbucket.org/pygame/pygame」我收到以下錯誤。

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ddarwin -D_THREAD_SAFE -DENABLE_NEWBUF=1 -I/usr/X11R6/include -I/usr/local/include/SDL -I/usr/local/include/SDL -I/usr/X11/include -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/imageext.c -o build/temp.macosx-10.9-intel-2.7/src/imageext.o 

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] 

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future 

error: command 'cc' failed with exit status 1 

---------------------------------------- 
Cleaning up... 
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-fpBwWg-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Nhafjq-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-fpBwWg-build 
Storing debug log for failure in /Users/username/Library/Logs/pip.log 

根據說明我不能設置標誌的編譯器忽略這個警告,所以我很茫然。我一直在嘗試安裝Pygame一段時間,並會感謝任何幫助。

最佳, 失意初學者的Python用戶

回答

0

這是蘋果的重大更改到Xcode的命令行工具的結果。這是簡要解釋here

少數網站提供一個(臨時)的辦法解決這個錯誤,雖然。嘗試運行:

export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" 

在您的終端,然後重試安裝。如果這不起作用,可能不會有一個簡單的解決方法或解決您的問題。請發佈您的結果,但請!