gonzo ~/a/packages conda env list
# conda environments:
#
ppo_latest /nohome/jaan/abhishek/anaconda3/envs/ppo_latest
root * /noh
I just ran into a similar issue. Recently started developing on windows, so getting used to the PowerShell. Ironically when trying to use 'conda activate ' in Git-bash i got the error
$ conda activate obf
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- cmd.exe
- 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'.
Running the command in my PowerShell (elevated) as instructed did the trick for me.
conda init powershell
This should be true across all terminal environments, just strange PowerShell didn't return this error itself.
As of conda 4.4, the command
conda activate <envname>
is the same on all platforms. The procedure to add conda
to the PATH
environment variable for non-Windows platforms (on Windows you should use the Anaconda Prompt), as well as the change in environment activation procedure, is detailed in the release notes for conda 4.4.0.
For conda versions older than 4.4, command is either
source activate <envname>
on Linux and macOS or
activate <envname>
on Windows. You need to remove the conda
.
After installing conda in Linux if you are trying to create env just type bash and hit Enter later you can create env
Functions are not exported by default to be made available in subshells. I'd recommend you do:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate my_env
In the commands above, replace ~/anaconda3/ with the path to your miniconda / anaconda installation.
The anaconda functions are not exported by default, it can be done by using the following command:
$ source ~/anaconda3/etc/profile.d/conda.sh $ conda activate my_env
If your console does not show (base)
after running conda activate base
, then try running:
conda init
Then running conda activate <your_env>
should show the name of (<your_env>)
at the beginning of the shell prompt.
This worked for me on Windows. My PATH environment variable was set properly so conda activate base
did not raise any error but quietly failed.