LoginSignup
1
1

More than 5 years have passed since last update.

condaの仮想環境を起動するとbashのpromptが崩れる

Posted at

condaの仮想環境を起動すると、bashのpromptが崩れてしまいました。

通常の挙動

[user@hostname pwd]$
[user@hostname pwd]$ source activate test
(test)[user@hostname pwd]$

起こった事象

[user@hostname pwd]$
[user@hostname pwd]$ source activate test
(test)

根本原因は不明ですが、source activateを行った時に、CONDA_PS1_BACKUP="$PS1"が読み込まれず、CONDA_PS1_BACKUP=となっていたことが原因でした。

取り敢えずは、.bashrcに以下を記載して対応。
export CONDA_PS1_BACKUP="[\u@\h \W]$ "

githubでも議論がありましたが、どうやって解決されたのかは不明でした。。。
https://github.com/conda/conda/issues/4916

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