Skip to content

Can't uninstall package installed with sudo pip install -e - "No files were found to uninstall." #5330

@Poupine

Description

@Poupine
  • Pip version: 10.0.1
  • Python version: 3.5
  • Operating system: Ubuntu Xenial

When installing a local package with sudo -H pip3 install -e <path-to-my-package>, my package is found and imported as expected, but the way it is done is possibly the worst that could possibly have been implemented ...

Let me explain: what it does, is somehow adding <path-to-my-package> in my python path in some obscure way and when I run sudo -H pip3 uninstall <my-package-name>, I am greeted with the following message: Can't uninstall '<my-package-name>'. No files were found to uninstall.

Where it becomes annoying is that even after deleting the egg-link file corresponding to my package from dist-packages, my python path still has the path to my library which means if my library is broken (which happened twice already in the span of 2 days with 2 different libraries), I am stuck with an unusable version of my library.

The only solution I have found so far to this, since I have no idea how the path to my library gets written to the python path, has been to wipe clean python and pip from my system and reinstall from scratch.

PS: Installing without -e has the correct behaviour (as in when I uninstall my package it actually does uninstall it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: editableEditable installationsC: uninstallThe logic for uninstallation of packagesauto-lockedOutdated issues that have been locked by automationstate: needs reproducerNeed to reproduce issuetype: supportUser Support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions