Directory 默认情况下,VSC在错误的文件夹中启动
我使用VSC已经有一段时间了,但最近发生了一些奇怪的事情。 当我启动它时,终端上会显示以下内容: “PS C:\Users\User\OneDrive\Desktop\flask\hello\u flask>”Directory 默认情况下,VSC在错误的文件夹中启动,directory,Directory,我使用VSC已经有一段时间了,但最近发生了一些奇怪的事情。 当我启动它时,终端上会显示以下内容: “PS C:\Users\User\OneDrive\Desktop\flask\hello\u flask>” 为什么一开始就说“PS” 为什么默认情况下会转到“桌面\flask\hello\u flask” 那么,为什么我要尝试运行这样一个简单的代码(通过单击右上角的绿色“在文件中运行Python”按钮): a = 5 b = 4 c = a + b print (c) 在另一个文件夹中
a = 5
b = 4
c = a + b
print (c)
在另一个文件夹中的test.py文件中,这是我收到的消息
PS C:\Users\User\OneDrive\Desktop\flask\hello_flask> conda activate C:\Users\User\anaconda3
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 C:\Users\User\anaconda3
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
然而,在某些情况下,它确实给了我正确的答案:9
>>> a = 5
>>> b = 4
>>> c = a + b
>>> print (c)
9
>>>