Conda breaks when activating environment -- CommandNotFoundError: No command 'conda conda'

Kyle Miller

I've been running Anaconda successfully for a few months on my PC (Win 10) using Git Bash and Anaconda3. However, today I tried to update to the latest version of Anaconda (I don't remember which version but it was xxxx.6 or 8 to xxxx.11). The installation failed (stupid me didn't save the error messages) and after that, I keep started getting this error when I type 'conda xxxxx'.

 CommandNotFoundError: No command 'conda conda'.

However, I am still able to use most conda commands if I called the conda.exe file by giving the full path, with one very unfortunate exception, activating environments.

I've also noticed some other weird behavior. If I reboot my PC, conda works fine, even without calling the full path. I can create a new environment, but as soon as I call source activate or activate or conda activate, it breaks and from then on, any reference to 'conda' gives me CommandNotFoundError: No command 'conda conda'.

There is also some weird behavior in anaconda prompt. Everything seems to work fine. I can create and activate environments with no problem but when I first start the prompt, it says The system cannot find the path specified.

I tried - making sure my PATH was correct - uninstalling and reinstalling for all users, then for just my user - using the 'conda init bash' --> I think this just broke it further. - deleting the registry keys associated with Python - they look good now

I'm at a loss for what to do. I really want to be able to use conda within my git bash again. Any advice is appreciated.

Josh Peak

This issue has been addressed in conda 4.6.14 as per discussions in the linked Anaconda Github issue #8506

Short version

# while conda command is busted use $CONDA_EXE instead
$CONDA_EXE update conda -y
$CONDA_EXE init
# restart shell

Longer shell outputs

In git bash (2.21.0) Win10:

λ env | grep CONDA
CONDA_SHLVL=0
CONDA_EXE=/c/Users/me/AppData/Local/Continuum/anaconda3/Scripts/conda.exe
CONDA_BAT=C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda.bat
_CE_CONDA=conda

λ $CONDA_EXE update conda -y
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: ...working...
.....

λ $CONDA_EXE init
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda.exe
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda-env.exe
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda-script.py
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\conda-env-script.py
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Library\bin\conda.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\_conda_activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\rename_tmp.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda_auto_activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\conda_hook.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\activate.bat
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\condabin\deactivate.bat
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\activate
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\Scripts\deactivate
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\etc\profile.d\conda.sh
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\etc\fish\conf.d\conda.fish
no change     C:\Users\me\AppData\Local\Continuum\anaconda3\shell\condabin\Conda.psm1
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\shell\condabin\conda-hook.ps1
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\Lib\site-packages\xonsh\conda.xsh
modified      C:\Users\me\AppData\Local\Continuum\anaconda3\etc\profile.d\conda.csh
modified      C:\Users\me\Documents\WindowsPowerShell\profile.ps1
modified      HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

==> For changes to take effect, close and re-open your current shell. <==


Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Activating conda environment over SSH

From Dev

How to set specific environment variables when activating conda environment?

From Dev

Activating conda environment with its full path

From Dev

activating conda environment in within a shell script

From Java

How do I prevent Conda from activating the base environment by default?

From Dev

PackageNotFoundError when creating new Conda environment

From Dev

pylint failing in conda environment

From Java

Create empty conda environment

From Java

Use Conda environment in pycharm

From Dev

Create a conda environment offline

From Dev

Use Conda environment in pycharm

From Dev

Conda: Creating a virtual environment

From Dev

conda environment not reading dependencies

From Dev

Create a conda environment offline

From Java

Conda command not found

From Dev

sudo: conda: command not found

From Dev

conda command not found

From Dev

conda install -c conda-forge python-pdal Solving environment: | hangs when running windows 10

From Dev

Python path issue with dirname: command not found and conda environment python not found

From Java

In which conda environment is Jupyter executing?

From Dev

Numba in conda environment failing tests

From Dev

Debuggin with pdb within a conda environment

From Dev

Exception while cloning environment with conda

From Dev

Link Conda environment with Jupyter Notebook

From Dev

How to install Selenium in a conda environment?

From Dev

conda virtual environment not working with pycharm

From Dev

portable conda environment as a binary tarball

From Dev

Exception while cloning environment with conda

From Dev

No indication of activated conda environment in terminal

Related Related

HotTag

Archive