AWA
AWA

Reputation: 57

ANACONDA navigator cannot launch-from win32com.shell import shellcon, shell

I have downloaded the ANACONDA(Anaconda3-2020.02-Windows-x86) and installed. However, i found that i cannot lauch the ANACONDA navigator so i tried using the command line and got its feedback.

from win32com.shell import shellcon,shell  
Import Error:DLL load failed: The specified moduld could not found.

***(base) C:\WINDOWS\system32>Anaconda -navigator
Traceback (most recent call last):
  File "C:\Users\aaron.wu\Anaconda3\Scripts\anaconda-script.py", line 6, in <module>
    from binstar_client.scripts.cli import main

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\__init__.py", line 17, in <module>
    from .utils import compute_hash, jencode, pv

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\utils\__init__.py", line 17, in <module>
    from .config import (get_server_api, dirs, load_token, store_token,

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\utils\config.py", line 54, in <module>
    USER_LOGDIR = dirs.user_log_dir

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 258, in user_log_dir
    version=self.version)

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 205, in user_log_dir
    path = user_data_dir(appname, appauthor, version); version = False

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 67, in user_data_dir
    path = os.path.join(_get_win_folder(const), appauthor, appname)

File "C:\Users\aaron.wu\Anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 284, in _get_win_folder_with_pywin32
    from win32com.shell import shellcon, shell
ImportError: DLL load failed: The specified module could not be found.***

It seems that the reason of failure is the module win32com.shell and i tried to install win32com.shell using conda install win32com.shell or reinstall the ANACONDA. In the end, it did not work out. I am new to ANACONDA and really need some help for sorting this out! Thanks!

Upvotes: 4

Views: 6301

Answers (4)

cpilko
cpilko

Reputation: 11852

It looks like the issue is related to a conflict in newer versions of the pywin32 package.

Try downgrading the package (I had 301 installed):

pip install --user --upgrade pywin32==228

Source: https://github.com/conda/conda/issues/11503#issuecomment-1159613779

Upvotes: 1

Walid Lakouader
Walid Lakouader

Reputation: 71

Had exactly the same issue and solved it by installing the latest of win32com.

pip install pywin32==301

Upvotes: 7

Joyce Lai
Joyce Lai

Reputation: 41

I had the same issue:

from win32com.shell import shellcon, shell
    ImportError: DLL load failed: The specified module could not be found.***

I fixed mine by clearing my environment variable called PYTHONPATH. I was messing with it and tried to add paths to it for another application (which turned out to not use PYTHONPATH).

I guess that was confusing Anaconda when starting up because it was importing incorrect libraries or something. I couldn't use Spyder, Anaconda Navigator, Jupyter Notebooks or anything other than Anaconda Prompt. Glad the issue wasn't too big!

Upvotes: 4

AWA
AWA

Reputation: 57

It finally solved! i uninstalled the 32-bit Anaconda Meanwhile, i noticed that in the C:\Users\aaron.wu\AppData\Local\Programs There is folder named python which is not supposed to be there and it includeds pip folder. I manually delete "python" folder and reinstalled 64-bit and it worked out!

Upvotes: 0

Related Questions