設定 Python 路徑
作者:王一哲
日期:2019/7/11
前言
當我們在 Windows 中安裝 Python 時,如果沒有勾選安裝視窗中最下方的選項Add Python 3.6 to PATH,在安裝之後系統會不知道要從什麼地方找到 Python 指令,也就無法指令介面執行 Python。這時我們需要自行修改 Windows 的環境變數 PATH,以下是修改的步驟。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Python 3.6.4 安裝視窗
Windows 7
-
在桌面上的電腦按滑鼠右鍵叫出快速選單,點擊最下方的內容。

-
點擊左側的第4個項目進階系統設定。

-
點擊進階分頁下方的環境變數。

-
從下方的系統變數中找到Path,雙擊滑鼠左鍵編輯Path。

-
由於 Windows 7 當中系統變數的變數值會擠在同一格當中,
不同的路徑之間以分號隔開。如果安裝的 Python 版本不同,假設安裝 3.7 版,則將路徑中的 Python36 改成 Python37 即可。

-
開啟指令界面,輸入
如果會顯示已安裝的 Python 版本就成功了。

Windows 10
-
從左下角的開始選單搜尋環境變數,選取搜尋結果中的編輯系統環境變數。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
點擊進階分頁下方的環境變數。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
從下方的系統變數中找到Path,雙擊滑鼠左鍵編輯Path。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
Windows 10 當中系統變數的變數值不會擠在一起,點擊右上方的新增,加入以下兩個路徑。
如果安裝的 Python 版本不同,假設安裝 3.7 版,則將路徑中的 Python36 改成 Python37 即可。在後來的版本當中,例如 3.9 版,預設的路徑會是
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 開啟指令界面,輸入
如果會顯示已安裝的 Python 版本就成功了。