赞
踩
『python自动化』分享win32gui、cv2、easyocr等库相关的新手入门教程,目标是编写python程序进行自动化办公,解放双手。
我是在独立的项目虚拟环境中安装配置各个库,其他的库基本上都能pip install解决,只有在安装win32gui库的时候遇到了困难,
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting win32gui Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b8/75/7bed82934e51903f9d48b26b3996161bb2dce1731607b4bb7fd26003ed3e/win32gui-221.5.tar.gz (605 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "e:\allworkspace\python work space\python纯图色脚本\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "e:\allworkspace\python work space\python纯图色脚本\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "e:\allworkspace\python work space\python纯图色脚本\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel return hook(config_settings) File "C:\Users\ASUS\AppData\Local\Temp\pip-build-env-5gya8ave\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "C:\Users\ASUS\AppData\Local\Temp\pip-build-env-5gya8ave\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires self.run_setup() File "C:\Users\ASUS\AppData\Local\Temp\pip-build-env-5gya8ave\overlay\Lib\site-packages\setuptools\build_meta.py", line 482, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\ASUS\AppData\Local\Temp\pip-build-env-5gya8ave\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup exec(code, locals()) File "<string>", line 27, in <module> File "C:\Users\ASUS\AppData\Local\Temp\pip-install-kiw84dvk\win32gui_712b634add45492f8cc5b815a960773e\win32\distutils\gui.py", line 6, in <module> from .command import win32_build_ext ModuleNotFoundError: No module named 'win32.distutils.command' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
这里安装pywin32
库就可以使用win32gui
等库,我一开始还想直接安装win32gui
,卡住了半天。
强调!!!PyCharm里的项目和路径最好不要包含中文!!!
没有飘红
大家喜欢的话,给个
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。