vscode Python環境


1.安裝

  安裝python

2.配置環境變量

  path環境變量增加

D:\Python35\Scripts\;D:\Python35\;

  測試是否安裝成功,命令行執行python -V

3.安裝

  安裝 vs  code

  安裝插件:

    Code Runner

    Python

  配置

 文件—》首選項—》設置,在settings.json中
{
"files.autoGuessEncoding": true, "code-runner.defaultLanguage": "utf-8", "code-runner.runInTerminal":true, "files.encoding": "utf8" }

4.測試

  新建文件夾Hello

  在Hello下新建.vscode/settings.json

   Ctrl+Shift+P打開命令板,輸入Python: Select Interpreter進行搜索

選擇python

在Hello下新建hello.py

msg = "hello world"
print(msg)

運行,右鍵

結果

E:\python\Hello>python -u "e:\python\Hello\Hello.py"
hello world

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM