pip 命令

📖 pip 命令文档

0%

Linux 安装

apt install python3-pip

基础命令

pip list			# 显示已安装的库
pip list -o # 显示已过时的库
pip show <library> # 显示库信息
pip install <library> # 安装库
pip install -U <library> # 更新库
pip uninstall <library> # 卸载库
pip check <library> # 检查依赖
pip [cmd] -h # 显示帮助

导出已安装包

pip freeze > requirements.txt

从文件递归安装

pip install -r requirements.txt

其它配置

# 设置默认使用pip3
pip3 intall --upgrade pip

源配置

临时使用

pip install [module] -i https://pypi.org/simple

全局配置

# 官方源
pip config set global.index-url https://pypi.org/simple

# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple

# 豆瓣源
pip config set global.index-url http://pypi.douban.com/simple
------------ 已触及底线了 感谢您的阅读 ------------
  • 本文作者: OWQ
  • 本文链接: https://www.owq.world/pip/
  • 版权声明: 本站所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处( ̄︶ ̄)↗