下載embed版python
https://www.python.org/downloads/windows/
選擇合適的版本,比如 Windows x86-64 embeddable zip file,下載後解壓到目標路徑備用
下載get-pip.py
https://pip.pypa.io/en/latest/installing/
下載後放到python所在路徑中。
打開python路徑中pythonxx._pth, 去掉import site
前的註釋,這樣 "\lib\site-packages"纔會加入sys.path中 。
然後打開命令行,進入python路徑,python.exe get-pip.py
注意,embed版沒有tkinter,需要圖形界面的還是用安裝版的好。