本文介绍了无法安装 win32gui的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to install win32gui with pip but I get an error:

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我已经升级了 setuptools 但它仍然无法正常工作...

I'm using python 3.7I've upgraded the setuptools but it is still not working...

推荐答案

Win32gui 与 3.7 不兼容.

Win32gui isn't compatible with 3.7.

2018 年发布 3.7,2017 年 8 月发布最新版 win32gui.

3.7 was realeased in 2018 and the latest version of win32gui was released in August 2017.

我建议安装 3.6 或更低版本作为解决方法.

I would suggest installing 3.6 or lower as a workaround.

@bronson 的答案比我早 9 天,但是使用 pip install pywin32 安装 pywin32 将安装 win32gui 与模块一起与窗口交互.

The answer by @bronson beat me to it by 9 days, but installing pywin32 with pip install pywin32 will install win32gui alongside modules for interfacing with windows.

这篇关于无法安装 win32gui的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 19:55