I installed Anaconda3 on a remote Linux (login shell: zsh) machine from a mac.
I wrote it in .bashrc here.
zsh
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
zsh Anaconda3-2019.10-Linux-x86_64.sh
#The license etc. will come out so check it and yes
#Confirm install location. This time it is directly under home, so enter as it is
#Here, without noticing the story of Initialize Anaconda 3, enter as it is ← Cause of this failure
#Originally
#Do you wish the installer to initialize Anaconda3
#in your /home/hogeuser/.bashrc ? [yes|no]
#[no] >>> /home/hogeuser/.zshrc ← here. Should have done this
Repair with conda init while referring to conda with an absolute path. Of course, if you change the zsh part, you can use fish
zsh
/home/hogeuser/anaconda3/bin/conda init zsh
source ~/.zshrc
It is now added to zsh's PATH.
I don't understand why I added this feature by default. Let's erase it.
zsh
conda config --set changeps1 False
If it is not fixed by ENTER, it is completed by restarting the terminal.
By the way, the character string that appears on the left side when typing a command in the terminal is It's in an environment variable called $ PS1. You can change the color and () a little cool by playing with this as you like. For example.
.zshrc
PS1='
%F{white}>>>%f %B%F{cyan}%m%f%b:%B%F{blue}%~%f%b:%B%F{red}%W:%T%f%b
%B%F{blue}%n%f%b [%?] %B%F{cyan}>%f%b '
Then
>>> foomachine:/home/hogeuser/anaconda3:01/29/20:10:54 hogeuser [0] >
I feel like this. If you look it up, there are many, so you can play for a few hours. that's all.
Recommended Posts