我在 Python 3.8 中设置了一个自动点击器,我需要 win32api 用于 GetAsyncKeyState 但它总是给我这个错误:
>>> import win32api
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing win32api: The specified module could not be found.
我在 Windows 10 家庭版 64x 上。我已经试过了
pip install pypiwin32
它成功安装但没有任何变化。我也尝试卸载并重新安装 python。我也尝试以同样的方式安装“django”,当我 import django
时它确实有效,所以我认为这只是一个 win32api 问题。
>>> import win32api
我希望输出没有,但实际输出总是那个错误^^
原文由 Glxce 发布,翻译遵循 CC BY-SA 4.0 许可协议
在管理员命令提示符下运行 Scripts\pywin32_postinstall.py -install
参考: https ://github.com/mhammond/pywin32/issues/1431
编辑:用户@JoyfulPanda 发出警告: