ImportError: DLL load failed while importing shell

Question:

Importing winshell (version 0.6) causes the following error:

>>> import winshell
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:Python39libsite-packageswinshell.py", line 32, in <module>
    from win32com.shell import shell, shellcon
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
Asked By: egeres

||

Answers:

Version 300 of pywin32 solved this issue for me! Check this other question for more info

Answered By: egeres

Had the same issue with Conda and librosa in Python 3.9.

Librosa references from win32com.shell import shellcon,shell, which was causing the same error you received.

Installing pywin32 via conda fixed the error for me:

conda install -c conda-forge librosa
Answered By: jbnunn

I’ve had similar in the past,was about to give up on Anaconda.
Here’s the solution

Apparently the wrong version of pywin32 gets installed.

I had the installed version 301 and after downgrading to 228 with pip install –upgrade pywin32==228 everything just started working.

Answered By: Dawood Ibrahim

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).

Answered By: Alex T

Try pip install –upgrade pywin32==228

This should resolve the issue

Answered By: Sushant Sur

I ran into this issue when trying to get Anaconda to run at all on a new installation. I followed Alex T’s recommendation to install version 300 of pywin32. Like him, I had to run it twice because it first installed version 302 for some reason. After running it the second time I can now run conda commands in that environment

pip install pywin32==300
Answered By: Swiftie

My simple solution is to install an Older version of Anaconda. This worked perfectly for me. I installed Anaconda3-2021.11-Windows-x86 version.

The Newer Version of Anaconda has some problems with pywin32. I first tried the command :

pip install –upgrade pywin32==228

but It didn’t workd for me. Installing an older version finally solved the problem of anaconda navigator not launching.

Answered By: Yash
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.