6
2

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.

fishでcondaの環境切替時にエラーが出るときの覚書

Posted at

このへんで議論されている話と一緒。
同じようなところで詰まっている人は沢山いるんだなーと
https://github.com/conda/conda/issues/2611

環境

$fish --version 
fish, version 2.7.1
$conda --version
conda 4.4.7

事象

source activate <ENV_NAME>がエラーになる

$source activate test1                                
source: Error encountered while sourcing file 'activate':
source: No such file or directory

対応

vi ~/.config/fish/config.fish して
source (conda info --root)/etc/fish/conf.d/conda.fish
を追加

使い方

conda activate <ENV_NAME>で切り替えできる

$ conda activate test1 # test1が有効
$ conda activate test2 # test2が有効
$ conda deactivate # test1が有効
$ conda deactivate # OS標準

環境がスタックされる(複数を同時利用すること無かったから気にしなかったけど前から??)

6
2
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
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?