How to fix "ImportError: DLL load failed" while importing win32api

Glxce

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.

I'm on Windows 10 Home 64x. I've already tried

pip install pypiwin32

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 ^^

José

Run Scripts\pywin32_postinstall.py -install in an Admin command prompt

ref: https://github.com/mhammond/pywin32/issues/1431

edit: User @JoyfulPanda gave a warning:

Running this script with admin rights will also copy pythoncom37.dll, pywintypes37.dll (corresponding to the pywin32 version), into C:\WINDOWS\system32, which effectively overwrites the corresponding DLL versions from Anaconda already there. This later causes problem when openning (on Windows) "Start Menu > Anaconda3 (64-bit) > Anaconda Prompt (a_virtual_env_name)". At least Anaconda 2019.07 has pywin32 223 installed by default. Pywin32 224 may work, but 225-228 causes problem for Anaconda (2019.07)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to fix 'ImportError: DLL load failed: The specified procedure could not be found.' while importing tensorflow-gpu?

From Dev

Pyinstaller ImportError : DLL load failed while importing win32gui

From Dev

How to find which DLL failed in "ImportError: DLL load failed while importing" in python?

From Dev

"ImportError: DLL load failed while importing" while using PyInstaller

From Dev

"ImportError: DLL load failed while importing _openmp_helpers"?

From Dev

Jupyter notebook does not launch (ImportError: DLL load failed while importing)

From Python

Cannot import from pywinauto: ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed

From Dev

Exception has occurred: ImportError DLL load failed while importing pdftotext: The specified module could not be found

From Dev

ImportError: DLL load failed while importing _psycopg: The specified module could not be found

From Dev

ImportError: DLL load failed while importing pyexpat: The specified module could not be found

From Dev

cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

From Dev

(ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found

From Dev

ImportError: DLL load failed while importing QtWebKit: Le module spécifié est introuvable

From Dev

"ImportError: DLL load failed" when importing tensorflow

From Dev

How to Fix: "ImportError: DLL load failed The specified procedure could not be found." when the DLLs are there

From Dev

ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

From Dev

How to resolve "ImportError: DLL load failed:" on Python?

From Dev

TensorFlow Error: ImportError: DLL load failed with error code 3221225501 while importing _pywrap_ tensorflow_internal in Python3.8

From Dev

ImportError: DLL load failed, while file is in working directory

From Dev

python cython ImportError: DLL load failed: %1 is not a valid Win32 application

From Java

ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

From Dev

ImportError: DLL load failed: %1 is not a valid Win32 application for _imaging module

From Dev

cx-freeze "ImportError: DLL load failed: %1 is not a valid Win32 application"

From Dev

" ImportError: DLL load failed: The specified procedure could not be found"- while Digit Recognition using CNN in Python using Keras

From Dev

ImportError: DLL load failed: The specified module could not be found. While attempting to import TensorFlow

From Dev

import win32service, win32api, win32con, winerror ImportError: DLL load failed: The specified module could not be found

From Dev

"ImportError: DLL load failed" in PyCharm w/ conda: how to automatically import conda's PATH?

From Dev

How can I bypass kivy module error: ImportError: DLL load failed: The specified module could not be found?

From Dev

Python: "ImportError: DLL load failed: The specified module could not be found." Problems when importing ffn (finance library for python)

Related Related

  1. 1

    How to fix 'ImportError: DLL load failed: The specified procedure could not be found.' while importing tensorflow-gpu?

  2. 2

    Pyinstaller ImportError : DLL load failed while importing win32gui

  3. 3

    How to find which DLL failed in "ImportError: DLL load failed while importing" in python?

  4. 4

    "ImportError: DLL load failed while importing" while using PyInstaller

  5. 5

    "ImportError: DLL load failed while importing _openmp_helpers"?

  6. 6

    Jupyter notebook does not launch (ImportError: DLL load failed while importing)

  7. 7

    Cannot import from pywinauto: ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed

  8. 8

    Exception has occurred: ImportError DLL load failed while importing pdftotext: The specified module could not be found

  9. 9

    ImportError: DLL load failed while importing _psycopg: The specified module could not be found

  10. 10

    ImportError: DLL load failed while importing pyexpat: The specified module could not be found

  11. 11

    cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

  12. 12

    (ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found

  13. 13

    ImportError: DLL load failed while importing QtWebKit: Le module spécifié est introuvable

  14. 14

    "ImportError: DLL load failed" when importing tensorflow

  15. 15

    How to Fix: "ImportError: DLL load failed The specified procedure could not be found." when the DLLs are there

  16. 16

    ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

  17. 17

    How to resolve "ImportError: DLL load failed:" on Python?

  18. 18

    TensorFlow Error: ImportError: DLL load failed with error code 3221225501 while importing _pywrap_ tensorflow_internal in Python3.8

  19. 19

    ImportError: DLL load failed, while file is in working directory

  20. 20

    python cython ImportError: DLL load failed: %1 is not a valid Win32 application

  21. 21

    ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

  22. 22

    ImportError: DLL load failed: %1 is not a valid Win32 application for _imaging module

  23. 23

    cx-freeze "ImportError: DLL load failed: %1 is not a valid Win32 application"

  24. 24

    " ImportError: DLL load failed: The specified procedure could not be found"- while Digit Recognition using CNN in Python using Keras

  25. 25

    ImportError: DLL load failed: The specified module could not be found. While attempting to import TensorFlow

  26. 26

    import win32service, win32api, win32con, winerror ImportError: DLL load failed: The specified module could not be found

  27. 27

    "ImportError: DLL load failed" in PyCharm w/ conda: how to automatically import conda's PATH?

  28. 28

    How can I bypass kivy module error: ImportError: DLL load failed: The specified module could not be found?

  29. 29

    Python: "ImportError: DLL load failed: The specified module could not be found." Problems when importing ffn (finance library for python)

HotTag

Archive