【发布时间】:2011-12-31 15:23:05
【问题描述】:
我一直在尝试让 pygame 模块在 macbook 10.6 中与 python3 一起使用。我读到它很棘手,我必须按照以下说明从源代码安装:http://programming.itcarlow.ie/PyGameInstall.pdf 一切正常,但是当我尝试导入 pygame 时出现此错误:
Python 3.2.2 (v3.2.2:137e45f15c0b, Sep 3 2011, 17:28:59)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pygame/__init__.py", line 95, in <module>
from pygame.base import *
ImportError: dynamic module does not define init function (PyInit_base)
我不知道这意味着什么。我已经完成了常规安装,它适用于 python 2.7,但我想要 python3 的一些功能。关于这里出了什么问题的任何想法?
【问题讨论】: