Skip to content

Install order when using: pip install --upgrade somepackage #9

Closed
@vbabiy

Description

@vbabiy

It looks like pip is installing the package to be updated before upgrading the dependencies. Aside from being kind of strange behavior, consider the following:

  • mymodule requires Twisted
  • Twisted has a plugins/ directory in which all third-party modules must copy their plugins.
  • pip install mymodule installs the dependencies, then mymodule as expected.
  • pip install --upgrade mymodule removes, re-installs mymodule first, then the dependencies. This means that Twisted is removed, then re-installed, wiping that plugins directory. It won't be repopulated, since mymodule has already been upgraded.

I'm not sure if this should be a bug, but I can't figure out why we'd want this order instead of the inverse. Whether it be fixing the "bug" or providing a flag to tell pip to install dependencies first, this would save me a whole lot of headache. I'm using Twisted here as a convenient example, but this scenario can hinder other projects as well.

If I didn't explain this well enough, reply and let me know. Thanks!


Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationtype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions