3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macOSにAnacondaをインストールして、fishやzshなどの設定(2019)

Last updated at Posted at 2019-11-17

Anacondaのインストール

pythonは僕のメイン言語じゃないので、pyenvなどを省略(絶対使い方忘れるから)
condaのダウンロードは公式HPから:https://www.anaconda.com/distribution/

各種shellの設定

conda init [shell]を利用する。

bash

/opt/anaconda3/bin/conda init bash

zsh

/opt/anaconda3/bin/conda init zsh

fish

/opt/anaconda3/bin/conda init fish

要注意

conda initはまだテストバージョンなので、バグが多い感じ
例えば、もし今のpathは/opt/anaconda3/bin/のままで、conda initを実行すると、次のようなエラーが出る(2019/11/17時点)。

- (line 1): 
begin; [y/N]:  
       ^
from sourcing file -
	called on line 61 of file /usr/local/Cellar/fish/3.0.2/share/fish/functions/eval.fish

in function 'eval'
	called on line 140 of file -

in function 'conda'
	called on line 145 of file -
	with parameter list 'activate base'

from sourcing file -
	called on line 6 of file ~/.config/fish/config.fish

from sourcing file ~/.config/fish/config.fish
	called during startup

Welcome to fish, the friendly interactive shell

ま、ターミナルを再起動したら治る。

おまけに

実はfishのプロファイルに追加されたのは

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
eval /opt/anaconda3/bin/conda "shell.fish" "hook" $argv | source
# <<< conda initialize <<<

だけだ。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?