Skip to main content
  1. Posts/

Python Pip

·203 words·1 min· loading · loading · ·
Author
Zhenda
python - This article is part of a series.
Part : This Article

python 工具 pip

用来安装第三方包

命令

类别命令含义
在线安装pip install xxx
pip install -r requirements.txt
在线换源安装pip config list查看源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx换源
离线安装, 公司很多情况不联网
pip download -r requirements.txt -d ./pkgs批量下载离线安装包
tar.gz或whlpip install --no-index --find-links=xxxx/packages/ -r requirements.txt使用requirements.txt 批量安装包, 需要全部验证通过了,才开始安装包
pip download mkdocs -d ./pkgs批量下载大型的安装包
tar.gz或whlpip install --no-index --find-links=xxxx/packages/ mkdocs批量安装大型的包
tar.gztar -xzvf xxx.tag.gz && cd xxx && pip install .
whlpip install xxx.whl
其余pip freeze > requirements.txt
pip uninstall xxx
pip install -u xxx
pip check
python - This article is part of a series.
Part : This Article