当前位置: 首页 > news >正文

包管理机制pip3

pip3

安装pip3

  • 安装pip3
apt install python3-pip
yum install python3-pip

从仓库出发的命令

  • 查询仓库信息
// 获取默认pip3源
pip3 config get global.index-url
  • 查询所有软件包
查询已经安装的所有软件包
pip3 list

从软件包出发的命令

  • 从软件包名出发查询其他信息
查询对应的安装包(zipp)的信息
pip3 show zipp
  • 查询软件包后者文件在哪里能够获得
pip3 search zipp
网址 : https://pypi.org/ https://github.com/

从文件出发相关的命令

好像pip3 中并不在乎文件列表和位置
因为 这些文件不能独立执行,他们要被 python解释.
所以python好像将文件的概念给弱化了.

本地数据库相关

  • 安装卸载包
安装包
pip3 install xxx # 指定版本
pip3 install django==2.2.2# 不使用默认pip3源 ,  指定pip3源
pip3 install requests      -i https://pypi.tuna.tsinghua.edu.cn/simple 卸载包
pip3 uninstall xxx# 输出安装的包列表到文件
pip3 freeze > requirements.txt
#以该文件安装包
pip3 install -r requirements.txt
  • 缓存
下载包
pip3 download zipp
  • 本地数据库文件
pip3 show -f zipp/usr/lib/python3/dist-packages/zipp-1.0.0.egg-info
/usr/lib/python3/dist-packages/zipp.py
/usr/lib/python3/dist-packages/__pycache__/zipp.cpython-310.pyc
/usr/lib/python3/dist-packages/zipp-1.0.0.egg-info/PKG-INFO
/usr/lib/python3/dist-packages/zipp-1.0.0.egg-info/dependency_links.txt
/usr/lib/python3/dist-packages/zipp-1.0.0.egg-info/requires.txt
/usr/lib/python3/dist-packages/zipp-1.0.0.egg-info/top_level.txt
/usr/share/doc/python3-zipp
/usr/share/doc/python3-zipp/changelog.Debian.gz
/usr/share/doc/python3-zipp/copyright
/var/lib/dpkg/info/python3-zipp.list
/var/lib/dpkg/info/python3-zipp.md5sums
/var/lib/dpkg/info/python3-zipp.postinst
/var/lib/dpkg/info/python3-zipp.prerm

pip3 仓库配置

  • 客户端仓库配置

pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip3 config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple
~/.pip/pip.conf
[global]
timeout=6000
index-url = https://mirrors.aliyun.com/pypi/simple
#extra-index-url = https://pypi.python.org/pypi[install]
trusted-host = mirrors.aliyun.com  # trusted-host 此参数是为了避免麻烦,否则使用的时候可能会提示不受信任

INSTALL OPTIONSpip install installs packages from:PyPI (a.k.a. The Cheeseshop) and other indexes, using requirements specifiers.• VCS project urls.• Local project directories.• Local or remote source archives• Local wheel directories (python-pip-whl installs its wheels in /usr/share/ python-wheels and they can be locally installed by pip using --find-links)
http://www.lryc.cn/news/120909.html

相关文章:

  • liunx在线安装tomcat
  • 导入示例工程出现error: failed to start ability. Error while Launching activity错误的解决办法
  • 【深入了解PyTorch】PyTorch分布式训练:多GPU、数据并行与模型并行
  • linux 下 网卡命名改名
  • 6.2.0在线编辑:GrapeCity Documents for Word (GcWord) Crack
  • 为什么需要智能指针?
  • 《华为认证》L2TP VPN配置
  • 【JVM】JVM垃圾收集器
  • StarGANv2: Diverse Image Synthesis for Multiple Domains论文解读及实现(一)
  • Go Gin 中使用 JWT
  • AWS中Lambda集成SNS
  • Mac下⬇️Git如何下载/上传远程仓库
  • linux 命令--常用关机命令
  • ttf-dejavu fontconfig字体
  • Open3D点云数据处理(十九):最小二乘直线拟合(矩阵方程法)
  • 数据库事务ACID介绍
  • SM8650 qcxserver.c STRM_Initialize
  • 适配器模式-java实现
  • 【elasticSearch系】3.完整搭建详尽版elk
  • 代码随想录day04
  • [Realtek] WPA_SUPPLICANT + WPA_CLI使用指南
  • # ⛳ Docker 安装、配置和详细使用教程-Win10专业版
  • Linux 教程
  • 图论——最短路算法
  • 在项目中增加网络加载需要考虑什么?
  • 阿里云服务器部署RabbitMQ流程
  • 青大数据结构【2014】
  • Ansible Playbook快速部署一主多从MySQL集群
  • 27.Netty源码之FastThreadLocal
  • linux下离线安装docker