I constantly get the following error upon conda activate base
on my MacOS Monterey iTerm2 terminals:
% conda activate base
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
Steps I have taken so far:
0-Extensive google search!
1- Tried conda init
:
% conda init
no change /Users/myname/miniconda3/condabin/conda
no change /Users/myname/miniconda3/bin/conda
no change /Users/myname/miniconda3/bin/conda-env
no change /Users/myname/miniconda3/bin/activate
no change /Users/myname/miniconda3/bin/deactivate
no change /Users/myname/miniconda3/etc/profile.d/conda.sh
no change /Users/myname/miniconda3/etc/fish/conf.d/conda.fish
no change /Users/myname/miniconda3/shell/condabin/Conda.psm1
no change /Users/myname/miniconda3/shell/condabin/conda-hook.ps1
no change /Users/myname/miniconda3/lib/python3.10/site-packages/xontrib/conda.xsh
no change /Users/myname/miniconda3/etc/profile.d/conda.csh
no change /Users/myname/.bash_profile
No action taken.
2- Uninstalled AND re-installed a fresh miniconda (I did this several times)
3- Switched my shell from zsh
to bash
and vice versa
4- Uninstalled AND re-installed iTerm2 (the powerful and famous terminal app on MacOS, which is my default terminal app)
5- Followed this post:
% source ~/miniconda3/etc/profile.d/conda.sh
/Users/myname/miniconda3/etc/profile.d/conda.sh:21: parse error near `}'
6- Added/commented following lines to ~/.zshrc
:
source ~/.bash_profile
export PATH="/Users/ruhollah/miniconda3/bin:$PATH"
Here is some info of my system:
> MacOS Monterey 12.6.2
> zsh 5.8.1
> % conda info
active environment : None
user config file : /Users/myname/.condarc
populated config files :
conda version : 22.11.1
conda-build version : not installed
python version : 3.10.8.final.0
virtual packages : __archspec=1=x86_64
__osx=10.16=0
__unix=0=0
base environment : /Users/myname/miniconda3 (writable)
conda av data dir : /Users/myname/miniconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/myname/miniconda3/pkgs
/Users/myname/.conda/pkgs
envs directories : /Users/myname/miniconda3/envs
/Users/myname/.conda/envs
platform : osx-64
user-agent : conda/22.11.1 requests/2.28.1 CPython/3.10.8 Darwin/21.6.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False