English 中文(简体)
通过 Mac 在 PyPy 安装 PyPy 游戏
原标题:Installing Pygame in PyPy via a Mac

我尝试在Mac OSX Lion上安装 Pygame 版本 1.9.1 释放 PyPy。 我首先运行了 < code> pypy config. py , 并使用 < code> pypy setup. py 安装 。 我将配置添加到安装过程中, 因为我看到它试图用普通 python 配置( 它安装正确, 但导致导入错误 ) 。 在安装过程中, 有许多警告, 例如 :

src/overlay.c:44:5: warning: implicit declaration of function  PyObject_Free  is invalid in C99 [-Wimplicit-function-declaration]
PyObject_Free ((PyObject*)self);
^

但它也给了我两个类似的错误:

    In file included from src/scale_mmx.c:33:
src/scale_mmx64.c:424:27: error: invalid instruction mnemonic  movsxl 
        asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ "
                          ^
<inline asm>:1:191: note: instantiated into assembly here
         /* MMX code for inner loop of X bilinear filter */  movl             -36(%rbp),      %ecx;            pxor          %mm0,      %mm0;           1:                                           movsxl         (%rdi), ...
                                                                                                                                                                                                     ^~~~~~
In file included from src/scale_mmx.c:33:
src/scale_mmx64.c:499:27: error: invalid instruction mnemonic  movsxl 
        asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ "
                          ^
<inline asm>:1:191: note: instantiated into assembly here
         /* MMX code for inner loop of X bilinear filter */  movl             -36(%rbp),      %ecx;            pxor          %mm0,      %mm0;           1:                                           movsxl         (%rdi), ...
                                                                                                                                                                                                     ^~~~~~
2 errors generated.

在我看来,PyPy被困在一条线上,这似乎很傻,因为这条线在C. 中产生了一个似乎空洞的评论。为什么它包封了以灰尘和动荡的语句超出了我的范围。但是,这是提供给我的代码,在普通的python中工作。这就是一个错误吗?还是我漏掉了什么?

最佳回答

可能是PyPy(PyPy)有与CPython(出于好坏原因)不同的#定义,

问题回答

暂无回答




相关问题
Pygame programs hanging on exit

I m tinkering around with pygame right now, and it seems like all the little programs that I make with it hang when I try to close them. Take the following code, for example: from pygame.locals ...

Alternative pygame resources

I have been trying to access the pygame website for a few weeks now, and I can t get to it. I doubt it s down, so I have to conclude that it s blocked because I am in China. I have no idea why. ...

Overlapping partially transparent shapes

If I draw any shape onto a surface (with SRCALPHA flag on) in a partially transparent colour it completely replaces what was underneath it, instead of overlapping like you would expect in image ...

Level Design in Pygame

Hey--I m trying to design my first game using the Pygame library for Python, and I was wondering what the best practices are for level design in general. I would love to hear what you guys think are ...

Intersection between bezier curve and a line segment

I am writing a game in Python (with pygame) that requires me to generate random but nice-looking "sea" for each new game. After a long search I settled on an algorithm that involves Bezier curves as ...

C lib with Python bindings where both want to render

I m sketching on some fluid dynamics in Python. After a while, I m looking for a bit more speed, so I rewrote the actual logic in C and put up some Python bindings (using SWIG). My problem now is ...

热门标签