Anaconda prompt ImportError, conda, and Navigator broken after interrupted package installation

After an interrupted conda package installation, Anaconda Navigator won’t launch, conda returns “not recognized as internal command”, and I get the following error when I open Anaconda Prompt:

Traceback (most recent call last):
  File "C:\Users\liuri\anaconda3\Scripts\conda-script.py", line 11, in <module>
    from conda.cli import main
  File "C:\Users\liuri\anaconda3\lib\site-packages\conda\cli\__init__.py", line 3, in <module>
    from .main import main  # NOQA
  File "C:\Users\liuri\anaconda3\lib\site-packages\conda\cli\main.py", line 34, in <module>
    from .conda_argparse import generate_parser
  File "C:\Users\liuri\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 30, in <module>
    from ..base.context import context
  File "C:\Users\liuri\anaconda3\lib\site-packages\conda\base\context.py", line 53, in <module>
    from ..common._os.linux import linux_get_libc_version
  File "C:\Users\liuri\anaconda3\lib\site-packages\conda\common\_os\__init__.py", line 10, in <module>
    from .windows import get_free_space_on_windows as get_free_space
  File "C:\Users\liuri\anaconda3\lib\site-packages\conda\common\_os\windows.py", line 12, in <module>
    from ctypes import (POINTER, Structure, WinError, byref, c_ulong, c_char_p, c_int, c_ulonglong,
  File "C:\Users\liuri\anaconda3\lib\ctypes\__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ImportError: DLL load failed while importing _ctypes: The specified module could not be found.

Anaconda Powershell returns the same error, with an additional

Invoke-Expression : Cannot bind argument to parameter 'Command' because it is an empty string.
At C:\Users\liuri\anaconda3\shell\condabin\Conda.psm1:76 char:36
+         Invoke-Expression -Command $activateCommand;
+                                    ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Expression], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Invo
   keExpressionCommand

I’ve only tried restarting my computer, as I don’t want to mess things up further. How do I go about fixing this?

1 Like

Good afternoon,

We are happy to assist you, please uninstall Anaconda with this guide:

https://docs.anaconda.com/free/anaconda/install/uninstall/

Then install it again:

https://docs.anaconda.com/free/anaconda/install/windows/

Let us know if that worked for you!!

this is the worst solution to this problem. I did it and lost every environment that I had. This is not a solution at all

1 Like

You might be able to fix this issue by just updating anaconda-navigator from the command-line - give that a try:

conda update anaconda-navigator

Similar for me, this is the 2nd time had this issue after Anaconda suggested me to upgrade. Did a conda update conda and then get error:

File “C:\Users\User\anaconda3\Lib\ctypes_init_.py”, line 8, in
from _ctypes import Union, Structure, Array
ImportError: DLL load failed while importing _ctypes: The specified module could not be found.

Uninstalling and reinstalling is painful exercise.