Skip to content

Pip not uninstalling previous versions when installing directly from a wheel path/url #1825

@agronholm

Description

@agronholm

Reproducible with pip 1.5.6 as follows:

  1. create and activate a virtualenv
  2. install wheel
  3. create a trivial setup.py
  4. run bdist_wheel
  5. install the wheel
  6. bump up the version in setup.py
  7. run bdist_wheel again
  8. install the newer version

Contents of setup.py used:

from setuptools import setup

setup(
  name='Foo',
  version='1.0.0'
)

The previous version remains in site-packages and "Foo" can be uninstalled twice.
If I install Foo as a wheel first and the next version as sdist, the old version is uninstalled properly.
If I install the sdist first and wheel later, I get two Foos in site-packages.
Thus I conclude that wheel installation does not check for an existing installation.
I'm not even sure this bug belongs to pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automation

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions