13

I'm getting the below error when I open visual studio. What can I do to completely remove the defaults? I already tried reinstalling and uninstalling Anaconda3, all versions of Python and Visual Studio

I want to start from scratch without Anaconda?

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

& : The term 'C:\Users\Name\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At C:\Users\Name\Documents\WindowsPowerShell\profile.ps1:4 char:4
+ (& "C:\Users\Name\Anaconda3\Scripts\conda.exe" "shell.powe ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Name...ripts\conda.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
Felipe Ceballos
  • 143
  • 1
  • 10
  • 3
    You can edit your Microsoft.VSCode_profile.ps1 file (full path can be found when you type `$profile` in the editor and remove all code referring to anaconda. To open the profile file, type `notepad $profile` in the terminal. After you've made changes to it, save the file and restart VSCode – Theo Dec 03 '20 at 20:32
  • Thanks for the help... This is the information showing on the file. Should I just delete everything?
    #region conda initialize # !! Contents within this block are managed by 'conda init' !! (& "C:\Users\Name\Anaconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression #endregion
    – Felipe Ceballos Dec 04 '20 at 15:06
  • If that is the whole content of the profile file, then yes, clear it totally. If there is more, you might want to leave the rest (if not related to conda) and just remove the part starting (and including) with `#region` and ending with `#endregion` – Theo Dec 04 '20 at 15:12

1 Answers1

28

Open folder:

C:\Users\[UserName]\Documents\WindowsPowerShell

You will see file there with name like profile.ps1. Edit file and remove everything related to Anaconda there, or delete it if all entries are related to Anaconda.

Hrvoje
  • 13,566
  • 7
  • 90
  • 104
Yuv
  • 281
  • 2
  • 4