PIP常用命令

inzens發表於2024-03-22

此文章僅供個人記錄,非專業人士隨筆

pip一般位於Python310/Scripts目錄下,找到Python的安裝目錄進去就能找到pip.exe

pip命令需要在Scripts目錄下執行,進入Scripts目錄,在路徑的位置輸入cmd即可;

顯示當前版本

pip show pillow

安裝指定版本

pip install pillow==9.5.0

升級到最新版

pip install --upgrade Pillow

檢視相容問題

pip check package_name

指定源來安裝

pip install -i https://pypi.douban.com/simple/ package_name

常用源

清華大學:https://pypi.tuna.tsinghua.edu.cn/simple
阿里雲:https://mirrors.aliyun.com/pypi/simple/
騰訊雲:https://mirrors.cloud.tencent.com/pypi/simple/