--- tags: Big Data --- # (進階/選修/課外)在 VScode 裡更有效率執行 python 程式的方法 每次都要在終端機輸入 `python xxx.py` 很麻煩對吧? 其實 VScode 已經幫你內建好點擊按鈕 -> 執行 python 指令的機制  ## 更進階 每次都還要用滑鼠?有沒有更懶人的方法? 安裝套件: Code Runner 之後,只要按 `Ctrl + Alt + N` 就會自動幫你執行了   ### Debug: 使用 Mac 系統要把預設執行的 python 改成 python3  1. 點『命令選擇區』(或快速鍵 Command + Shift + P)  2. 輸入 `settings.js` -> 選擇『喜好設定:開啟設定』  3. 放入以下設定檔 (注意要放在大括號裡面,建議倒數第二行) ``` "code-runner.executorMap": { // 套件 Code Runner 的設定 // 執行 python 檔案時要用 python3 (-u => unbuffered) "python": "python3 -u", }, ``` 4. 記得儲存 -> 測試看看吧! 
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.