python - PyGame GUI 出现问题 - Raspberry Pi

标签 python pygame raspberry-pi

我有一个Python脚本,我想在其中导入pygameui。当我执行时:

sudo pip install pygameui

在终端中,我收到以下消息:

Downloading/unpacking pygameui Running setup.py egg_info for package pygameui Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-12.0.4-py2.7.egg (from pygameui) Downloading/unpacking pygame>=1.9.1 (from pygameui)
Could not find a version that satisfies the requirement pygame>=1.9.1 (from pygameui) (from versions: ) No distributions matching the version for pygame>=1.9.1 (from pygameui) Storing complete log in /root/.pip/pip.log

我正在努力解决这个问题。有人可以帮助我吗?

最佳答案

该模块已经 3 年没有更新,但解决方法是:

首先从github下载master:

git 克隆 https://github.com/fictorial/pygameui.git

然后cd pygameui

使用编辑器打开 setup.py 并从 install_requires=['setuptools', 'pygame>=1.9.1 中删除 pygame>=1.9.1 '] -> ['setuptools']

最后运行sudo python setup.py install

关于python - PyGame GUI 出现问题 - Raspberry Pi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28150201/

相关文章:

python - PyGTK“断言 GTK_IS_WINDOW 失败

Python 使用了错误版本的 Numpy 模块

python-3.x - 有没有办法在 Pygame 中使用更多字体?

python - 类型错误 : 'pygame.Surface' object is not callable and pygame window crashes

python - 如何在 python 上编写一个程序,将树莓派连接到 Windows PC 并允许两者进行通信?

树莓派作为可连接的信标

python - 无法从源代码构建 SciPy,因为缺少 pybind11

python - DRF : how to change the value of the model fields before saving to the database

python - 为 Pygame 解决 "DLL load failed: %1 is not a valid Win32 application."

Python 多处理 : executing a function with randomness multiple times and getting identical results