Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?

More than 3 years have passed since last update.

@meshidenn

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

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
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What is going on with this article?