LoginSignup
0
1

More than 1 year has passed since last update.

Ubuntuでfish shell導入したらanacondaが使えなくなった問題の備忘録

Posted at

はじめに

最近Ubuntu 20.04のPCにfish shellを導入したのですが、anacondaのcondaコマンドを認識しなくなってしまったのでその対処の備忘録になります。

環境

  • Ubuntu 20.04 LTS
  • conda 4.10.1
  • fish 3.1.0

参考にしたサイト

毎度先人の方々にはお世話になっております。
ありがとうございます m(_ _)m

Mention how to enable Anaconda in fish shell #1
fish shell で pyenv anaconda環境の初期設定(mac)
fish shell で conda の仮想環境を有効化するための設定

問題①condaコマンドを認識しない

fish導入後、condaコマンドが認識されなくなってしまうようです。
こちらはデフォルトではfishのPATHにanacondaが入っていないことが原因とのことです。
以下コマンドをfishにて入力することでanacondaをfishのPATHに追加することができ、condaコマンドを認識するようになります。

set -U fish_user_paths "$HOME/anaconda3/bin" $fish_user_paths

問題②conda activateできない

問題①を解決すれば全部解決すると思いきや何故かconda activateが使えない…
以下を~/.config/fish/config.fishの末尾に追加すれば解決できます。

source (conda info --root)/etc/fish/conf.d/conda.fish
0
1
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
0
1