Importerror: DLL load failed while importing win32gui: 1 is not a valid Win32 Application.

Recently learned Python and then called.   There is no problem in installing PIP install pywin32

Error occurred when calling imort win32gui and win32API

Importerror: DLL load failed while importing win32gui: 1 is not a valid Win32 Application.

Then all kinds of Baidu   At the beginning, Google thought that Python 32/64 bit was a problem, because the openopc I used was only 32-bit, and it was also python2.7. It was hard to find the support of python3, but that library could only be used

Python 32, ah, am I too ignorant?It’s more than 202 years   There are only 32 bits.

Painstakingly modified the online tutorial for Python 32/64   Andconda said on the Internet that he integrated a lot of environments

Then the online tutorial said that the new environment of CONDA had been modified. I thought it was OK   But I still report the same mistake

Then I thought it was pychar. As a result, python CMD didn’t work. In the end, it was omnipotent Baidu, mainly behind

Is not a valid Win32 Application   , Don’t talk about not finding a module    No module named ‘win32gui’   Confusion

They don’t get the same problem

Baidu Dashen said that it might be a problem with the version. Execute PIP install pywin32 = = XXX, and then execute the code, because

My code basically depends on copy   If you only execute the import win32gui test in andconda propmt, you can judge the

Is there a problem.

Tested Python 64 bit   pywin32   There is a problem with version 301

Python 32-bit   pywin32   There is a problem with 226 and above

 

Read More: