本文共 1364 字,大约阅读时间需要 4 分钟。
pip 查看依赖关系
In the past, if you wanted to review your installed pip packages to see if there are updates available, you either had to use tools like or check all of them manually.
过去,如果您想查看已安装的pip软件包以查看是否有可用的更新,则必须使用类或手动检查所有这些 。
But since version 1.3 (released on 2013-03-07), pip supports the checking of dependencies with the new list command. In contrast to pip freeze, the primary idea of the list command is to list and analyze installed packages in a human readable (instead of machine parseable) format.
但自1.3版(于2013-03-07发行)以来,pip支持使用新的list命令检查依赖项。 与pip冻结相反, list命令的主要思想是以人类可读(而不是机器可解析)的格式列出和分析已安装的软件包。
$ pip freezedjango-unchained==1.0.1requests==1.1.0wsgiref==0.1.2
$ pip listdjango-unchained (1.0.1)requests (1.1.0)wsgiref (0.1.2)
The best thing about the new command is that you can check packages for updates and list only specific packages:
关于new命令的最好的事情是您可以检查软件包的更新并仅列出特定的软件包:
List Options: -o, --outdated List outdated packages (excluding editables) -u, --uptodate List uptodate packages (excluding editables) -e, --editable List editable projects. -l, --local If in a virtualenv that has global access, do not list globally-installed packages.
In summary, you can now show outdated dependencies with a single pip command:
总之,您现在可以使用单个pip命令显示过时的依赖项:
$ pip list --outdatedrequests (Current: 1.1.0 Latest: 1.2.0)
翻译自:
pip 查看依赖关系
转载地址:http://ljqwd.baihongyu.com/