1

I am trying to install geopandas and have therefore downloaded anaconda. However the anaconda prompt gives back an error when I try the command "conda install geopandas" (Installing geopandas with anaconda prompt causes ImportError). I discovered that conda won't install any package, nor will it create new environments. And, as it happens, will not even work for "conda info" (see below error report).

Looking through help suggestions on the internet I added both "C:\Users\Name\anaconda3" and "C:\Users\Name\anaconda3\Scripts" to the PATH System environment variable but it didn't resolve the issue.

Any help would be greatly appreciated.

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
    return getattr(module, func_name)(args, parser)
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\main_info.py", line 316, in execute
    info_dict = get_info_dict(args.system)
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\main_info.py", line 164, in get_info_dict
    pkgs_dirs=context.pkgs_dirs,
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\base\context.py", line 520, in pkgs_dirs
    fixed_dirs += user_data_dir(APP_NAME, APP_NAME),
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
    path = os.path.join(_get_win_folder(const), appauthor, appname)
  File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
    from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified module could not be found.

$ C:\Users\Francesco\anaconda3\Scripts\conda-script.py info '''

ZHTank
  • 11
  • 2

1 Answers1

0

I've experienced pretty much the same problem. I was able to narrow down the issue to pywin32 version 302.

Using version 301 worked for me.

Try: pip install pywin32==301 --force

See https://github.com/mhammond/pywin32/issues/1783

GordonAitchJay
  • 4,640
  • 1
  • 14
  • 16
  • downgrading didn't work for me because docker requires `pywin32==304`. Installing `pywin` via `conda` instead of `pip` did solve it for me, as in this answer: https://stackoverflow.com/a/64359808/6812182 – Mark Loyman Mar 02 '23 at 10:11