Identifying the dependency relationship for python packages installed with pip

前端 未结 8 671
隐瞒了意图╮
隐瞒了意图╮ 2020-11-29 16:20

When I do a pip freeze I see large number of Python packages that I didn\'t explicitly install, e.g.

$ pip freeze
Cheetah==2.4.3
GnuPGInterface==0.3.2
Landsc         


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 16:59

    First of all pip freeze displays all currently installed packages Python, not necessarily using PIP.

    Secondly Python packages do contain the information about dependent packages as well as required versions. You can see the dependencies of particular pkg using the methods described here. When you're upgrading a package the installer script like PIP will handle the upgrade of dependencies for you.

    To solve updating of packages i recommend using PIP requirements files. You can define what packages and versions you need, and install them at once using pip install.

提交回复
热议问题