Anaconda: disable prompt change

喜你入骨 提交于 2020-06-24 08:04:34

问题


When using anaconda (install for python), when I switch to the virtual env with this:

source activate my_env

It changes my prompt and adds (my_env) at the start of my PS1.

I've tried adding export VIRTUAL_ENV_DISABLE_PROMPT=1 to my bashrc, but it did not help.

Any idea?


回答1:


Run this on the terminal:

$ conda config --set changeps1 False

http://conda.pydata.org/docs/config.html#change-command-prompt-changeps1




回答2:


Add:

changeps1: False

to your .condarc file.

http://conda.pydata.org/docs/config.html#change-command-prompt-changeps1




回答3:


I've had a slightly different, but related problem: how to avoid the base env to be activated by default for every terminal window. Solution:

conda config --set auto_activate_base False

Note: this only works if you have run conda init first.



来源:https://stackoverflow.com/questions/36499220/anaconda-disable-prompt-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!