1
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.

「CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.」の対処法

Last updated at Posted at 2019-08-24

問題

Windows10+Anaconda+GitBashの環境で「CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.」と出ました。

ログはこちらです。

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.

To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - cmd.exe
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

対処法

メッセージに書いている通りに、.bashrcを修正したら解消しました。

修正前

conda activate base

修正後

conda.bat activate base

おわりに

.bashrcにCALL文を書いてもダメだったので参考になる人がいれば幸いです。

環境

Windows10
Git(Bash) 2.21.0
Anaconda(conda) 4.7.10

おまけ

Jenkinsのbat処理でconda activate するときは逆にCALLがないとダメです。
CALLなしにconda activateすると、conda.batが終了したら元のbat処理も終了してしまいます。
そこで、conda activate をCALL呼び出しする必要があります。

おまけのおまけ

ウチの子供にこんな迷路でひらがなを教えていて、結構よい感じでした。

こちらのサイトで古いですが公開しているので良かったら見てね。

A_Z_A_44_1_out_square.png

1
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
1
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?