Why does '(base)' appear in my anaconda command prompt?

前端 未结 7 1910
悲&欢浪女
悲&欢浪女 2020-12-13 09:54

My anaconda command prompt now says:

(base) C:\\users\\user_name>

I would like to know why (base) appears in front of the prompt. This s

相关标签:
7条回答
  • 2020-12-13 10:05

    If you face the issue in Ubuntu you can try the below two steps to remove it from your command prompt.

    1. conda config
    2. conda config --set changeps1 False
    0 讨论(0)
  • 2020-12-13 10:14

    I had the same issue, I typed the following command to remove the (base) reference:

    source deactivate

    0 讨论(0)
  • 2020-12-13 10:14

    It sounds like when you installed Anaconda, it's now seeing that as your default environment, and with Anaconda it's best that you install packages using conda rather than by using pip, because at best pip installed packages won't be recognized by Anaconda, and at worst the pip installed packages can break your Anaconda install. I went through some of this before myself, as I needed to use Anaconda for a Python course I was taking, however I use Kubuntu, so I don't have a lot of knowledge around using it on Windows.

    For more info on using Anaconda, see https://conda.io/docs/user-guide/getting-started.html You can probably use Anaconda Navigator to create virtual environments and install packages too.

    0 讨论(0)
  • 2020-12-13 10:17

    Although Blockchain Business's answer is correct, as of v 4.6.4

    DeprecationWarning: 'source deactivate' is deprecated. Use 'conda deactivate'.
    

    so,

    conda deactivate
    

    This actually deactivates Anaconda completely, so may not be the best solution...

    To restore:

     conda activate
    
    0 讨论(0)
  • 2020-12-13 10:18

    Try this:

    conda config --set auto_activate_base false
    

    The changeps1 only hide the command prompt, you still in this environment.

    auto_activate_base can avoid entering the environment.

    0 讨论(0)
  • 2020-12-13 10:18

    Showing the active environment in front of the path like (base) C:\users\user_name> is a feature, not a bug. If you pip-install a module into the base environment (bad practice warning: Use conda install this_module -c conda-forge or pip install this_module into a separate environment), you'll first need to activate the base environment before you can actually use this_module. If you don't know how to do this in your IDE (although this a base functionallity of any IDE), open a cmd shell, type conda activate and then start your IDE directly from the (base) C:\users\user_name> prompt.

    0 讨论(0)
提交回复
热议问题