Python 3.3的Pygame安装

2024-05-10 12:01:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试导入Pygame以用于我的Python,3.3版本。Pygame网站上的下载只有Python 3.1和3.2。我似乎无法导入Pygame,尽管我认为我已将其安装在正确的路径中。我已经尝试了3.1和3.2的Pygame下载。

Pygame是没有安装在正确的文件路径中,还是与我的Python版本(3.3)不兼容?

我正在运行Windows 7,错误如下:

Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import pygame
File ".\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.

Tags: 文件inimport路径版本most网站windows
3条回答

如果您使用的是Windows并使用Python3.3,请打开the download page on bitbucket。下载:pygame-1.9.2a0.win32-py3.3.msi

然后您可以通过导入pygame来测试是否有Pygame。

如果来自Paul Vincent Craven答案的解决方案给出“需要Python版本3.3,但在注册表中找不到”,则必须从official download site下载并安装此版本:

Python 3.3.0 Windows X86-64 MSI Installer

Pygame主页似乎很少更新。您可以从https://bitbucket.org/pygame/pygame/downloadsBitbucket直接下载Pygame版本。

相关问题 更多 >