【发布时间】:2019-06-01 20:16:52
【问题描述】:
我最近首次安装了 MS Visual Studio Code(我们将在即将进行的项目中使用它)。我在 python 中编写了一个简单的 Hello, World 程序,然后单击 Debug > Start without Debugging。 MSVSC 可以正常运行该程序,但之后它会运行更多命令,其中一个会产生错误(见下文)。这些命令是不必要的,错误是丑陋的和分散注意力的。
MSVSC 正在运行的脚本在哪里?我想删除那两条无用的行。
PS C:\Users\me> cd 'c:\Users\me\Documents\my-project'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\me\Anaconda3\python.exe' 'c:\Users\me\.vscode\extensions\ms-python.python-2019.4.12954\pythonFiles\ptvsd_launcher.py' '--default' '--nodebug' '--client' '--host' 'localhost' '--port' '51699' 'c:\Users\me\Documents\my-project\hello.py'
hello, world
distance 5.0
PS C:\Users\me\Documents\my-project> C:/Users/me/Anaconda3/Scripts/activate
PS C:\Users\me\Documents\my-project> 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 C:\Users\me\Documents\my-project>
【问题讨论】: