設定 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
在桌面上的 電腦 按滑鼠右鍵叫出快速選單,點擊最下方的 內容 。
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 →
點擊左側的第4個項目 進階系統設定 。
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 7 當中系統變數的變數值會擠在同一格當中,
C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\
不同的路徑之間以分號隔開。如果安裝的 Python 版本不同,假設安裝 3.7 版,則將路徑中的 Python36 改成 Python37 即可。
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 版本就成功了。
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
從左下角的開始選單搜尋 環境變數 ,選取搜尋結果中的 編輯系統環境變數 。
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 當中系統變數的變數值不會擠在一起,點擊右上方的 新增 ,加入以下兩個路徑。
C:\Program Files\Python36\Scripts\
C:\Program Files\Python36\
如果安裝的 Python 版本不同,假設安裝 3.7 版,則將路徑中的 Python36 改成 Python37 即可。在後來的版本當中,例如 3.9 版,預設的路徑會是
C:\Users\[UserName]\AppData\Local\Programs\Python39\Scripts\
C:\Users\[UserName]\AppData\Local\Programs\Python39\
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 版本就成功了。