Pygame 1.9.6 未在 Python 3.8.1 中加载 [英] Pygame 1.9.6 not loading in Python 3.8.1

查看:63
本文介绍了Pygame 1.9.6 未在 Python 3.8.1 中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里真的很奇怪.我的 Mac(Catalina 10.15.2)上有 Python 3.8.1 的 64 位副本.我已经通过 pip3 install pygame 成功安装了 pygame.每次运行Python3,导入pygame,都会收到hello from the pygame community...的成功信息.

Really strange issue here. I have a 64bit copy of Python 3.8.1 on my Mac (Catalina 10.15.2). I have successfully installed pygame via pip3 install pygame. Every time I run Python3 and import pygame, I get the successful message of hello from the pygame community....

但是,如果我运行任何需要导入 pygame 的程序,我的 Python 启动器的图标就会无限循环并加载.我没有收到错误消息.我真的一无所获.没有打开的窗户.在终端(和空闲终端)窗口中 hello from the... 消息之后只是一个空行.

However, if I run any program that requires an import of pygame, the icon for my python launcher just loops and loads for an infinite amount of time. I get no error messages. I literally get nothing. No opened windows. Just a blank line on the terminal (and IDLE terminal) window after the hello from the... message.

我的 Mac 任务栏上有一个 Python 弹跳图标,表示它正在加载.但是什么都没发生?我已经在 pygame 程序的每个实例上对此进行了测试,但没有成功.甚至嵌入在程序中的 Aliens 示例也不起作用.

I have on my Mac taskbar a bouncing icon of Python, indicating that it is loading. But nothing happens? I've tested this on every instance of a pygame program with no success. Even the Aliens example embedded within the program does not work.

推荐答案

我遇到了同样的问题.在终端中执行此操作:

I had the same issue. Did this in Terminal:

python3 -m pip install pygame==2.0.0.dev6

在 PyCharm 中,我再次将 pygame 包安装到项目解释器中,并为特定版本选择了指定版本"选项:2.0.0.dev6

and in PyCharm I installed pygame package once more into project interpreter with "Specify version" option selected for a specific version: 2.0.0.dev6

然后它开始工作了.

这篇关于Pygame 1.9.6 未在 Python 3.8.1 中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆