我已经在Mac os x 10.5.8上安装了来自python.org的python-2.7-macosx10.5.dmg。
我正在发布: python setup.py build for pyPortMidi-0.0.3
并获得:
Found darwin (OS X) platform
running build
running build_ext
pyrexc pypm.pyx --> pypm.c
/Users/baz/Downloads/pyPortMidi-0.0.3/pypm.pyx:357:21: Type 'PmError' not acceptable as a boolean
building 'pypm' extension
creating build/temp.macosx-10.5-intel-2.7
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -O3 -arch i386 -arch x86_64 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pypm.c -o build/temp.macosx-10.5-intel-2.7/pypm.o
pypm.c:1:2: error: #error Do not use this file, it is the result of a failed Pyrex compilation.
pypm.c:1:2: error: #error Do not use this file, it is the result of a failed Pyrex compilation.
lipo: can't figure out the architecture type of: /var/folders/oO/oO1flrWgHAC8u6KdoO0Wq++++TI/-Tmp-//ccTcgy0s.out
error: command 'gcc-4.0' failed with exit status 1有人能帮我解决这个问题吗?
发布于 2012-03-21 00:10:45
我发现最简单的方法是构建pygame中包含的pyPortMidi版本,它已经应用了一些修复。
您可以使用以下模式在您的文件顶部导入它,首选标准版本,但后退到pygame捆绑版本。
try:
import pypm
except ImportError:
from pygame import pypm使用MacPorts时,可以使用以下命令轻松安装:
port install py27-game +portmidi如果使用其他方法构建,我不知道您是否需要一些特殊的东西来在构建中包含portmidi。
发布于 2012-05-24 06:15:05
看看下面的链接,似乎所有的东西都被破坏和丢失了。不知道他们是否会在短期内修复它...一段时间以来也一直困扰着我。
https://groups.google.com/forum/#!topic/pygame-mirror-on-google-groups/sf3I8Q-wYQA
https://stackoverflow.com/questions/9608694
复制相似问题