『Python』其實係『虛擬機』, 先裝『.py』源碼編譯為字節碼『.pyc』. 『Python虛擬機』再執行『Python字節碼』. 同『java』壹樣.
登入『Python』官網『https://www.python.org/』.
- Stable Diffusion需下載10.6版係『python-3.10.6-amd64.exe』
- 勾『Use admin privileges when installing py.exe』管理帳號安装程式
- 勾『Add python.exe to PATH』将路徑加入『環境變量』
- 撳『Customize installation』定制安装.
- 『Optional features』選項
Documentation | 文檔 |
Pip | (必揀)下載和管理python包 |
Tcl/tk and IDLE | 裝IDLE包 |
Python test suite | 裝測試包 |
Py launcher For all users(requires admin privileges) | 裝‘py’啟動程式 |
- 『Advanced Optionsa』高级選項
Install python 3.12 for all users | 冚辦闌帳號裝python程式 |
Associate files with python(requires the ‘py’ launcher) | 關聯‘py’文檔 |
Create shortcuts for installed applications | 制作python捷徑檔 |
Add Python to environment variables | 將Python路徑添加到環境變量 |
Precompile standard library | 預編譯標準庫 |
Download debugging symbols | 下載調試符號 |
Download debug binaries(requires VS 2017 or later) | 下載調試庫 |
- 『環境變量』->『系統變量』->『Path』
- 撳『新增』分别加入.
C:\Users\bookc\AppData\Roaming\Python\Python310\ |
C:\Users\bookc\AppData\Roaming\Python\Python310\Scripts\ |
C:\Users\bookc\AppData\Roaming\Python\Python310\site-packages\ |
C:\Program Files\Python310\Scripts\ |
C:\Program Files\Python310\ |
檢查最新版pip時出錯.
WARNING:There was an error checking the latest version of pip. |
需手動升級pip至最新版.
python -m pip install –upgrade pip |
https://www.python.org/ |
https://www.python.org/downloads/windows/ |
https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe |