Conda won't modify bash configuration to actually enable use


#1

I installed conda by running the following: snap install --classic --edge conda but conda init bash still fails to actually set things up so that I can activate conda environments.

$ conda init bash
no change     /snap/conda/current/condabin/conda
no change     /snap/conda/current/bin/conda
no change     /snap/conda/current/bin/conda-env
no change     /snap/conda/current/bin/activate
no change     /snap/conda/current/bin/deactivate
no change     /snap/conda/current/etc/profile.d/conda.sh
no change     /snap/conda/current/etc/fish/conf.d/conda.fish
no change     /snap/conda/current/shell/condabin/Conda.psm1
no change     /snap/conda/current/shell/condabin/conda-hook.ps1
no change     /snap/conda/current/lib/python3.7/site-packages/xonsh/conda.xsh
no change     /snap/conda/current/etc/profile.d/conda.csh
no change     /home/myusername/snap/conda/1/.bashrc
No action taken.

when I try to activate something, I get this:

$ conda activate

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'.


Classic request for conda [Was: Auto connect request for conda]
#2

The error you’re seeing here seems to imply that the conda snap needs to look at /home/.../.bashrc and not /home/.../snap/conda/1/.bashrc.

@jjhelmus you could modify your snap to try to get the user’s real $HOME via something like: