Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid conda activate base from automatically executing in my VS Code editor?

PS E:\Python and Data Science\PythonDatabase> conda activate base
conda : The term 'conda' 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 line:1 char:1
+ conda activate base
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (conda:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS E:\Python and Data Science\PythonDatabase> & C:/Users/Lenovo/Anaconda3/python.exe "e:/Python and Data Science/PythonDatabase/CourseHelper.py"
Hello World
PS E:\Python and Data Science\PythonDatabase> 
like image 705
Vaibhav Bhavsar Avatar asked Mar 31 '20 13:03

Vaibhav Bhavsar


People also ask

How do you get out of conda base environment?

You can always use conda activate or conda deactivate to switch between your environments. You can directly activate the environment you wish to use by using conda activate . conda deactivate will deactivate your current active environment and change to the default environment which is the base environment.

How does conda activate the base environment by default?

Open anaconda prompt & use 'conda env list' to find the location of the environment you wish to use. Go to the start menu, right-click 'Anaconda Prompt' and go to file location. Open its properties & change the target to the location of your preferred environment.

What is enable conda environment in VS Code?

Conda environments can't be automatically activated in the VS Code Integrated Terminal if the default shell is set to PowerShell. To change the shell, see Integrated terminal - Terminal profiles. You can manually specify the path to the conda executable to use for activation (version 4.4+).


1 Answers

You can set "python.terminal.activateEnvironment": false in your settings to deactivate activation of your environment. Alternatively, you can set "python.condaPath" to where conda exists so the extension can use conda appropriately.

like image 170
Brett Cannon Avatar answered Oct 14 '22 14:10

Brett Cannon