python - 无法安装win32gui

标签 python python-3.x

我正在尝试使用 pip 安装 win32gui,但出现错误:

C:\Users\משתמש>pip install win32gui

Collecting win32gui
Using cached https://files.pythonhosted.org/packages/b8/75/7bed82934e51903f9d48b26b3996161bb2dce1731607b4bb7fd26003ed3e/win32gui-221.5.tar.gz
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\temp\pip-install-ycidig8u\win32gui\setup.py", line 27, in <module>
from win32.distutils.gui import win32gui_build_ext
File "c:\temp\pip-install-ycidig8u\win32gui\win32\distutils\gui.py", line 6, in <module>
from .command import win32_build_ext
ModuleNotFoundError: No module named 'win32.distutils.command'
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in c:\temp\pip-install-ycidig8u\win32gui\

我正在使用 python 3.7 我已经升级了设置工具,但它仍然无法正常工作...

最佳答案

安装pywin32。这给你 win32gui。

pip install pywin32

关于python - 无法安装win32gui,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52806906/

相关文章:

python - Django 模板 : force choices on field and print display value with get_FOO_display()

python - Kivy 中的不可编辑文本

python - 使用 zlib 支持从源代码构建 Python

Python从文件中提取可变长度文本

python - Monty Hall 模拟未按预期工作

python - 将数据框的列组合成新的数据框

python - 从c调用python函数,传递一些 float 组并在它们上存储数据

Python 不使用 for 循环查询列表

python - 使用您自己的模块时有关硬编码变量的最佳实践问题

python - 计算两个字符串中的字符数的问题