利用pip导出以及导入安装依赖包,跳过错误继续安装!



  • A服务器导出依赖

    pip freeze >requirements.txt
    

    B服务器导入安装依赖

    pip install -r requirements.txt
    

    使用下面的命令安装依赖能自动跳过安装错误的依赖包,继续安装!

    while read requirements; do pip install $requirements; done < requirements.txt
    

Log in to reply