How to fix ImportError: DLL load failed while importing win32api
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)
how to fix import win32api # noqa: E402 ImportError: DLL load failed while importing win32api: %1 is not a valid
This is can be due to different bit versions of applications you are using here
refer:https://www.youtube.com/watch?v=fGuHMVAruAE
so better to check the bit versions
ImportError: DLL load failed while importing shell
I finally managed to get Anaconda to start working by executing the line:
pip install pywin32==300
I had to do it twice, because the first time it went for 301, not 300. The second time then dropped it to 300. This was from the Anaconda for Windows installer downloaded just two days ago from the Anaconda website and doing a "clean install"!
What a fiasco!
Until that point, NOTHING really worked. Almost every important command within Anaconda would fail with the Win32com error, and Navigator would not even start. Apparently the latest version of pywin32 is 304, but it doesn't work either. Is anyone looking into this? For a newbie like me, this is a very bad look for Anaconda as a tool! I was on the brink of simply giving up when I literally stumbled onto this thread.
Note that it has been MONTHS between my post and the one before mine. I'd say that this has probably caused a lot of people to simply give up (assuming that there are many who actually try to install this on Windows per month, that is).
import win32api error in Python 2.6
After I copy pywintypes26.dll and pythoncom26.dll from C:\Python26\Lib\site-packages\pywin32_system32
to C:\Python26\Lib\site-packages\win32
-> Solve the problem!
Related Topics
Accessing the List While Being Sorted
Paging/Scrolling Through Set of 2D Heat Maps in Matplotlib
How to Melt 2 Columns at the Same Time
Scaling of Tkinter Gui in 4K (3840*2160) Resolution
Repeat Rows in Data Frame N Times
The Main() Function Appears to Not Work
Cannot List Ftp Directory Using Ftplib - But Ftp Client Works
Find Substring in String But Only If Whole Words
Reading File Opened with Python Paramiko Sftpclient.Open Method Is Slow
Most Efficient Way to Search the Last X Lines of a File
Remove Duplicate Rows from Pandas Dataframe Where Only Some Columns Have the Same Value
Trouble Installing Textblob with Pip
Attributeerror: Can't Set Attribute When Connecting to SQLite Database with Flask-Sqlalchemy
How to Plot and Annotate Grouped Bars in Seaborn/Matplotlib
Finding Index of Nearest Point in Numpy Arrays of X and Y Coordinates
Generating Sublists Using Multiplication ( * ) Unexpected Behavior