pygame 无法使用 python 64 位打开

pygame won't open with python 64-bit

我使用的是 python 32 位,pygame 工作得很好,但后来我需要 python 64 位才能获得另一个模块。现在 python 64 位设置为我的标准 python,所以每次我尝试用 pygame 打开我的程序时它会立即崩溃,我必须用 IDLE 32 打开它们-位然后按F5到运行他们,这很烦人。

我想知道是否可以让 pygame 与 python 64 位一起工作。

我试过 pip 安装 pygame 64 位,但它说它已经安装了。

如果无法让 pygame 与 64 位 python 一起工作,请告诉我如何更改它以便 32 位 python 成为默认设置。

顺便说下我用的是python3.6.4

谢谢

也许先尝试卸载 pygame。

py -m pip uninstall pygame
py -m pip uninstall pygame
py -m pip install pygame --user

此外,您可以从 python(或 IDLE)中尝试 运行 pip。请注意,使用此方法安装后,您必须重新启动 IDLE。

>>> import pip
>>> pip.main('uninstall pygame'.split())
>>> pip.main('install pygame --user'.split())

包含最新安装说明的网页位于:https://www.pygame.org/wiki/GettingStarted