【Python】查看第三方库的依赖关系
语法
pip show [options] <package>
常用参数 含义 -f 显示包的文件列表 -v 显示更多的信息 字段释义
字段 含义 示例 Name 名称 requests Version 版本号 2.31.0 Summary 概述 Python HTTP for Humans. Home-page 官网或文档链接 https://requests.readthedocs.io Author 作者 Kenneth Reitz Author-email 作者邮箱 me@kennethreitz.org License 许可证 Apache 2.0 Location 在系统中的安装位置 D:\Application\Python\Lib\site-packages Requires 所依赖的其他包名 certifi, charset-normalizer, idna, urllib3 Required-by 被哪些其他包所依赖 - Metadata-Version 元数据的版本号 2.1 Installer 安装这个包的工具或方法 pip Classifiers 分类信息,包括开发状态、环境、目标受众、许可证、语言、操作系统等 - Entry-points 入口点,通常用于定义可执行脚本或插件 - Project-URLs 项目地址,包括文档、源代码等 - 示例
D:>pip show requests Name: requests Version: 2.31.0 Summary: Python HTTP for Humans. Home-page: https://requests.readthedocs.io Author: Kenneth Reitz Author-email: me@kennethreitz.org License: Apache 2.0 Location: D:\Application\Python\Lib\site-packages Requires: certifi, charset-normalizer, idna, urllib3 Required-by:
D:>pip show requests -v Name: requests Version: 2.31.0 Summary: Python HTTP for Humans. Home-page: https://requests.readthedocs.io Author: Kenneth Reitz Author-email: me@kennethreitz.org License: Apache 2.0 Location: D:\Application\Python\Lib\site-packages Requires: certifi, charset-normalizer, idna, urllib3 Required-by: Metadata-Version: 2.1 Installer: pip Classifiers: Development Status :: 5 - Production/Stable Environment :: Web Environment Intended Audience :: Developers License :: OSI Approved :: Apache Software License Natural Language :: English Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Internet :: WWW/HTTP Topic :: Software Development :: Libraries Entry-points: Project-URLs: Documentation, https://requests.readthedocs.io Source, https://github.com/psf/requests