簡體   English   中英

Python 2.7 / 3 PyGame安裝

[英]Python 2.7/3 PyGame Installation

我試圖在運行特立獨行的Macbook Pro上安裝pygame。

我已經按照以下教程安裝pygame:“ http://dudeslife.com/blog/2014/programming/installing-python-3-3-3-pygame-on-os-x-mavericks/

我都按照指示在python3和python 2.7下安裝pygame。

不幸的是,當我運行“ sudo pip install hg + 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用戶

這是從Apple到Xcode命令行工具所做的重大更改的結果。 這是簡單的說明這里

不過,有幾個站點提供了此錯誤的(臨時)解決方法。 嘗試運行:

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

在您的終端中,然后重試安裝。 如果這不起作用,則可能沒有簡單的解決方法或解決您的問題的方法。 不過請回傳您的結果!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM