How to remove (base) from Powershell?

After installing Anaconda for python. (base) appears before the directory in Powershell. How to remove it?

enter image description here

2 Answers

The (base) notatation is there to tell you which virtual environment that you are on. This is very useful when you are using different environments on the same system.

If you are not doing anything in python, you can run conda deactivate until you want need to use the python environment. You can stop it auto activating with conda config --set auto_activate_base false

0

Obviously your prompt function was modified, presumably by one of the profiles.

View the definition with:

(Get-Command prompt).Definition

And see if you can evaluate the origin by viewing the possible profile files:

$PROFILE|Format-List -Force

You could also let powershell do the work:

## Q:\Test\2019\07\21\SU_1462281.ps1
$PROFILE.PSObject.Properties | Where-Object Membertype -eq Noteproperty | ForEach-Object{ if (Test-Path $_.Value){ Select-String -Path $_.Value -Pattern 'function\s*prompt' } }
#

Sample output, which contains found Path:LineNumber:Line

C:\Users\LotPings\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:69:function Prompt {

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like