pip下载离线依赖包与安装离线依赖

激活conda的python=3.6环境,然后下载requirement.txt里面定义的资源
建立一个download.bat脚本文件

@echo off
call :CurDIR "%cd%"
pause
goto :eof
:CurDIR
    echo %~nx1
    set DirName=%~nx1
    call activate py36
    pip download -d %DirName% -r requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

requirement.txt里面可以类似如下的配置

transformers==3.1.0

https://blog.csdn.net/u011860731/article/details/46573143?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-4&spm=1001.2101.3001.4242
pip freeze > requirement.txt
pip install pip2pi
pip2tgz /var/lib/packages -r requirement.txt
pip install -r requirement.txt --no-index --find-links=file:///tmp/packages

你可能感兴趣的:(pip下载离线依赖包与安装离线依赖)