首頁 開發工具 VSCode vscode怎麼運行python程式碼

vscode怎麼運行python程式碼

Feb 10, 2020 pm 05:40 PM
vscode

vscode怎麼運行python程式碼

vscode怎麼執行python程式碼    

Ctrl Shift B 執行python程式碼。

前提是得配置taske.json

1、按下Ctrl Shift B,點選

vscode怎麼運行python程式碼

##2 、點選建立

vscode怎麼運行python程式碼

3、執行外部指令

 

vscode怎麼運行python程式碼

4、建立完,取代裡面的內容為(注意command的要改成你自己python的安裝路徑)

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "python",
            "type": "shell",
            "command": "C:/Users/FSITQD/AppData/Local/Programs/Python/Python36-32/python",
             "args": [
                "${file}"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

然後Ctrl Shift B就運行了。

相關文章教學推薦:

vscode教學

以上是vscode怎麼運行python程式碼的詳細內容。更多資訊請關注PHP中文網其他相關文章!

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

PHP教程
1596
276
如何在Windows上安裝VSCODE 如何在Windows上安裝VSCODE Jul 27, 2025 am 03:16 AM

Gotohttps://code.visualstudio.comanddownloadtheWindowsUserInstaller.2.Runthe.exefile,allowchanges,andselectrecommendedoptionsincludingaddingtoPATHandcreatingadesktopshortcut.3.ClickFinishtolaunchVSCodeafterinstallation.4.Optionallyinstallusefulextens

Vscode和Visual Studio之間有什麼區別 Vscode和Visual Studio之間有什麼區別 Jul 30, 2025 am 02:38 AM

VSCodeisalightweight,cross-platformcodeeditorwithIDE-likefeaturesviaextensions,idealforwebandopen-sourcedevelopment;2.VisualStudioisafull-featured,Windows-onlyIDEdesignedforcomplex.NET,C ,andenterpriseapplications;3.VSCodeperformsfasteronlower-endma

如何在VSCODE中使用參數運行Python腳本 如何在VSCODE中使用參數運行Python腳本 Jul 30, 2025 am 04:11 AM

TorunaPythonscriptwithargumentsinVSCode,configurelaunch.jsonbyopeningtheRunandDebugpanel,creatingoreditingthelaunch.jsonfile,andaddingthedesiredargumentsinthe"args"arraywithintheconfiguration.2.InyourPythonscript,useargparseorsys.argvtoacce

VSCODE用戶設置在哪裡? VSCODE用戶設置在哪裡? Jul 24, 2025 am 02:02 AM

VSCode用戶設置存儲位置取決於操作系統,通常位於用戶配置文件下的特定目錄。 Windows路徑為C:\Users$$用戶名]\\AppData\\Roaming\\Code\\User\\settings.json,macOS為/Users\$$用戶名]/Library/ApplicationSupport/Code/User/settings.json,Linux為/home$$用戶名]/.config/Code/User/settings.jso

如何將VSCODE與WSL(Linux的Windows子系統)一起使用 如何將VSCODE與WSL(Linux的Windows子系統)一起使用 Aug 01, 2025 am 06:26 AM

InstallWSLandaLinuxdistributionbyrunningwsl--installinPowerShellasAdministrator,thenrestartandsetuptheLinuxdistribution.2.Installthe"Remote-WSL"extensioninVSCodetoenableintegrationwithWSL.3.OpenaprojectinWSLbylaunchingtheWSLterminal,navigat

如何更改VSCODE中的字體大小? 如何更改VSCODE中的字體大小? Aug 02, 2025 am 02:37 AM

TochangethefontsizeinVSCode,useoneofthesemethods:1.OpenSettingsviaCtrl ,(orCmd ,onMac),searchfor"fontsize",andadjustthe"Editor:FontSize"value.2.OpenSettings(JSON)fromtheCommandPalette,thenaddormodify"editor.fontSize":e.g

如何在VSCODE中調試單元測試 如何在VSCODE中調試單元測試 Aug 01, 2025 am 06:12 AM

CreateModifyLaunch.JSONINVSCODEBYOPENEDTHERUNANDDEBUGVIEW,SELECTingYourenVironment(例如Python,Node.js)和ConconfiguringItfo ryourtestframework(例如,pytest,jest)。 2。 setbreakpointsinyourtestfile,selectthedebuggconfiguration,andstartdebuggingwithf5topaus

如何更改VSCODE中的字體大小 如何更改VSCODE中的字體大小 Jul 26, 2025 am 04:13 AM

tochangetheTsizeInvScode,gotofile>“首選項”>“設置”,搜索“ fontsize”,andmodifythe“ editor:fontsize” value.2

See all articles