python - 为什么 import pygame_textinput 不起作用?

标签 python pygame

我尝试使用 import pygame_textinput 来调用 pygame_textinput 模块。但这不起作用。我从 here 得到的.

这是由另一个 Stack Overflow 页面提供的,用于获取有关 pygame_textinput 模块的信息:

How to create a text input box with pygame?

为了以防万一,我尝试从网上获取它,因为它被称为第三方模块,但没有成功。我在 python shell 中编写了这样的代码:

import pygame_textinput

并收到这样的错误消息:

Traceback (most recent call last):

   File "<pyshell#15>", line 1, in module

import pygame_textinput

ImportError: No module named pygame_textinput

帮忙? (PS.错误信息第二行中的模块一词实际上被<>覆盖了,因为无法显示,所以我删除了它。

最佳答案

你安装了吗? https://pypi.org/project/textinput/

pip install pygame_textinput

指导如何安装pip:https://pip.pypa.io/en/stable/installing/

关于python - 为什么 import pygame_textinput 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56818102/

相关文章:

python - Pygame无法打开文件

python - 无法连接到 Jupyter Notebook

python - 使用 numpy.logspace() 时出错 : how to generate numbers spaced evenly on a log-scale

python - 如何在 windows python 中安装 Openface

python - pygame中移动 Sprite 之间的碰撞

python - 为什么我的 pygame 应用程序循环不能正常工作?

python - 如何从语句中返回(或打印)最大命中数?

python - 当我在 win7 中使用 pyside-uic 时,突破并告诉我 :ImportError: No module named pkg_resources

python - 如何检测 Sprite 是否已在pygame中被点击

python - 全局变量未绑定(bind)局部错误