-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Closed
Copy link
Labels
questionAsking for clarification or supportAsking for clarification or support
Description
Question
I'm stuck refreshing a broken package. What do I not understand?
How to reproduce:
- Create a working project (with
pipas an example package)
$ uv init
$ uv add pip
# confirm is not broken
$ uv run -m pip --version
pip 25.1.1 from /home/uv_reinstall/.venv/lib/python3.12/site-packages/pip (python 3.12)- Break the package
$ echo "i'm broken" >> /home/uv_reinstall/.venv/lib/python3.12/site-packages/pip/__main__.py
$ uv run -m pip --version
...
File "/home/uv_reinstall/.venv/lib/python3.12/site-packages/pip/__main__.py", line 25
i'm broken
^
SyntaxError: unterminated string literal (detected at line 25)- How do completely reinstall it? None of my attempts work, e.g.
$ uv run --reinstall-package pip --refresh-package pip -m pip --version
...
File "/home/uv_reinstall/.venv/lib/python3.12/site-packages/pip/__main__.py", line 25
i'm broken
^
SyntaxError: unterminated string literal (detected at line 25)$ uv pip uninstall pip
$ uv sync --reinstall
$ uv run -m pip --version
...
File "/home/uv_reinstall/.venv/lib/python3.12/site-packages/pip/__main__.py", line 25
i'm broken
^
SyntaxError: unterminated string literal (detected at line 25)It seems even the cache is broken ..
$ rm -r .venv/
$ uv sync
Creating virtual environment at: .venv
Resolved 2 packages in 0.68ms
Installed 1 package in 7ms
+ pip==25.1.1
$ uv run -m pip --version
...
File "/home/uv_reinstall/.venv/lib/python3.12/site-packages/pip/__main__.py", line 25
i'm broken
^
SyntaxError: unterminated string literal (detected at line 25)Platform
Linux 6.12.35 x86_64 GNU/Linux
(NixOS 25.05)
Version
uv 0.7.16 / uv 0.7.19
Metadata
Metadata
Assignees
Labels
questionAsking for clarification or supportAsking for clarification or support