问题描述
我正在Python 3.8中设置自动点击程序,我需要Win32api来获取GetAsyncKeyState,但它总是给我这个错误:
I'm setting up an autoclicker in Python 3.8 and I need win32api for GetAsyncKeyState but it always gives me this error:
>>> 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 Home 64x上.我已经尝试过了
I'm on Windows 10 Home 64x. I've already tried
pip install pypiwin32
,它可以成功安装,但是没有任何变化.我也尝试卸载并重新安装python.我还尝试以相同的方式安装"django",并且当我import django
时它实际上可以工作,因此我认为这仅是win32api问题.
and it successfully installs but nothing changes. I tried uninstalling and re-installing python as well. I also tried installing 'django' in the same way and it actually works when I import django
, so i think it's a win32api issue only.
>>> import win32api
我希望输出为空,但实际输出始终是该错误^^
I expect the output to be none, but the actual output is always that error ^^
推荐答案
pypiwin32
是过时的发行版.卸载并安装pywin32
:
pypiwin32
is an outdated distribution. Uninstall it and install pywin32
:
pip uninstall pypiwin32
pip install pywin32
这篇关于如何修复"ImportError:DLL加载失败"在导入win32api时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!