首页 > 解决方案 > 如何避免 conda activate base 在我的 VS Code 编辑器中自动执行?

问题描述

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> 

标签: pythonpython-3.xvisual-studio-codecondavscode-settings

解决方案


您可以"python.terminal.activateEnvironment": false在设置中设置停用您的环境的激活。或者,您可以设置"python.condaPath"存在的位置conda以便扩展可以适当地使用 conda。


推荐阅读