8
【笔记】Pip下载离线依赖包
source link: https://en.loli.fj.cn/2022/11/26/Pip%E4%B8%8B%E8%BD%BD%E7%A6%BB%E7%BA%BF%E4%BE%9D%E8%B5%96%E5%8C%85/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
【笔记】Pip下载离线依赖包
2022-11-26
Pip下载离线依赖包
对应平台对应Python版本的离线依赖包只能安装在对应平台的对应Python版本下
<pkg>
:软件包名-d <src>
:指定下载目录
pip download <pkg>
- 将所有需要下载的依赖包写入一个文件
requirement.txt
<pkg>
-d <src>
:指定下载目录
pip download -r requirement.txt
- 通过包名安装,会自动安装所需所有离线依赖包
<pkg>
:离线依赖包名--find-links=<src>
:指定离线依赖包的存放路径
pip install <pkg>
- 离线依赖包有的是
.whl
,有的是.tar.gz
,都可以通过pip直接安装
<file>
:离线依赖包文件名--find-links=<src>
:指定离线依赖包的存放路径
pip install <file>.whl
pip install <file>.tar.gz
.tar.gz
也可以解压后手动安装
tar -zxvf <file>.tar.gz
cd <file>
python setup.py build
python setup.py install
--find-links=<src>
:指定离线依赖包的存放路径
pip install -r requirement.txt
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK