分享

windows pip升级模块

 wushaohe 2021-07-06

一、使用pip批量更新

查看可更新包:

pip list --outdated --format=columns 批量下载并更新: pip install pip-review pip-review --local --interactive
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

二、升级一个模块

pip install --upgrade requests  // mac,linux,unix 在命令前加 sudo -H
  • 1
  • 1

安装指定版本:

pip install tensorflow==1.11.0
  • 1
  • 1

三、Linux中升级

$ pip freeze --local | grep -v '^-e' | cut -d = -f 1  | xargs -n1 pip install -U

pip list -o --format legacy|awk '{print $1}'` ; do pip install --upgrade $i; done
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

参考学习网址:
https://blog.csdn.net/sunqiande88/article/details/80155587
https://blog.csdn.net/kl28978113/article/details/77980778

四、python 模块的批量导出和批量安装

批量导入模块内容

pip freeze > requirements.txt
  • 1
  • 1

批量安装
C:\Users\Administrator\requirements.txt 指的是安装模块requirements.txt的绝对路径。

pip install -r C:\Users\Administrator\requirements.txt
  • 1
  • 1

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多