Skip to content

Error: cannot uninstall package occurs on installing a package a second time #6872

@mweislley

Description

@mweislley

I'm working on upgrading my project to use uv and ran into this error when I installed the requirements.txt file a second time. I've narrowed it down to exactly a particular dependency that gives the error.

Reproduction steps

vscode ➜ /workspaces $ uv venv -p 3.12.3 test-venv
Using Python 3.12.3
Creating virtualenv at: test-venv
Activate with: source test-venv/bin/activate
vscode ➜ /workspaces $ source test-venv/bin/activate
(test-venv) vscode ➜ /workspaces $ uv pip install suds-community==0.8.5
Resolved 1 package in 99ms
Prepared 1 package in 65ms
Installed 1 package in 2ms
 + suds-community==0.8.5
(test-venv) vscode ➜ /workspaces $ uv pip install suds-community==0.8.5
Resolved 1 package in 1ms
error: Cannot uninstall package; `top_level.txt` file not found at: test-venv/lib/python3.12/site-packages/suds_community.egg-info/top_level.txt

Expected
Don't throw an error when installing a package that was already installed properly

I've included a more detailed output with RUST_LOG=TRACE and -v
reinstall.log

Metadata

Metadata

Assignees

Labels

compatibilityCompatibility with a specification or another tool

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions