目录
前言
提示:这里可以添加本文要记录的大概内容:
本文是一个记录。
提示:以下是本篇文章正文内容,下面案例可供参考
1 分三步
以下是对 pip 用户指南中 Installing from local packages 部分的摘抄和整理。
1.1. 先查找 wheel cache
- 能够找到的前提:之前依 requirements.txt 安装过
- 命令行:
python -m pip download --destination-directory DIR -r requirements.txt
- 若没有之前的安装包,则进行下一步
1.2. 若无 wheel cache 则依 requirements.txt 下载并安装
- 先指定 wheel
- 命令行:
py -m pip wheel --wheel-dir DIR -r requirements.txt
1.3. 设置仅从本地安装
- 使用
--find-links
和--no-index
- 命令行