您可以尝试使用pipdeptree将依赖项显示为树结构,例如:
$ pipdeptreeLookupy==0.1wsgiref==0.1.2argparse==1.2.1psycopg2==2.5.2Flask-script==0.6.6 - Flask [installed: 0.10.1] - Werkzeug [required: >=0.7, installed: 0.9.4] - Jinja2 [required: >=2.4, installed: 2.7.2] - MarkupSafe [installed: 0.18] - itsdangerous [required: >=0.21, installed: 0.23]alembic==0.6.2 - SQLAlchemy [required: >=0.7.3, installed: 0.9.1] - Mako [installed: 0.9.1] - MarkupSafe [required: >=0.9.2, installed: 0.18]ipython==2.0.0slugify==0.0.1redis==2.9.1
要使其运行:
pip install pipdeptree
编辑: 正如@Esteban在评论中指出的那样,您还可以反向列出树,
-r或者使用单个软件包列出,
-p<package_name>以便找到可以运行的已安装Werkzeug:
$ pipdeptree -r -p WerkzeugWerkzeug==0.11.15 - Flask==0.12 [requires: Werkzeug>=0.7]
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)