I have installed Fish on my Ubuntu, but every time I open my terminal I have to run the bash
command to initiate conda base
. I hadn't this problem with ZSH in the past.
Is there any solution to make it run as conda base
by default?
As also mentioned in nicdelillo's answer in the Add conda to path in fish StackOverflow question, just run the following command from your Bash shell:
conda init fish
This command will add something like this in your .config/fish/config.fish
file:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
eval /home/user/miniconda3/bin/conda "shell.fish" "hook" $argv | source
# <<< conda initialize <<<
After that just open a new fish session and you should be able to initialize your conda
environment as you do using the Bash shell.
On Mac OS, basically I made the mistake of installing anaconda before fish and it was throwing errors when launching fish shell in pycharm terminal.
brew uninstall anaconda
brew install anaconda
cond init fish
Now whenever I start a fish shell I don't get errors.