Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone installation script installed uv fails to uv self update #6774

Closed
scienceplease opened this issue Aug 28, 2024 · 7 comments · Fixed by #9487
Closed

Standalone installation script installed uv fails to uv self update #6774

scienceplease opened this issue Aug 28, 2024 · 7 comments · Fixed by #9487
Labels
bug Something isn't working releases Related to building and distributing release artifacts of uv

Comments

@scienceplease
Copy link

scienceplease commented Aug 28, 2024

Recent versions of uv have not been able to uv self update despite being installed via the standalone installation script. I have not been able to pinpoint the issue to anything in particular on my system. All relevant information below:

cat /etc/redhat-release 
# Fedora release 40 (Forty)

env | grep CARGO_HOME
# CARGO_HOME=/home/username/.local/opt/rust/cargo

curl -LsSf https://astral.sh/uv/install.sh | sh
# downloading uv 0.4.0 x86_64-unknown-linux-gnu
# installing to /home/username/.local/opt/rust/cargo/bin
#  uv
#  uvx
# everything's installed!
#
# To add /home/username/.local/opt/rust/cargo/bin to your PATH, either restart your shell or run:
#
#    source /home/username/.local/opt/rust/cargo/env (sh, bash, zsh)
#    source /home/username/.local/opt/rust/cargo/env.fish (fish)

which uv
# ~/.local/opt/rust/cargo/bin/uv

uv --version
# uv 0.4.0

uv self update
# warning: Self-update is only available for uv binaries installed via the standalone installation scripts.
#
# If you installed uv with pip, brew, or another package manager, update uv with `pip install # --upgrade`, `brew upgrade`, or similar.
@telljmc
Copy link

telljmc commented Sep 3, 2024

I am encountering a similar issue on a Macbook Pro M3. I installed uv using the curl command. When I attempt to update I encounter the following:

❯ uv self update
info: Checking for updates...
error: The installation failed. Output from the installer:
downloading uv 0.4.3 aarch64-apple-darwin

I tried the "--verbose" flag which resulted in exactly the same message. I tried closing everything and rebooting with the same result. Next up will be to do an uninstall and fresh reinstall.

@zanieb
Copy link
Member

zanieb commented Sep 3, 2024

Hm. I'm on a M3 as well and can't reproduce that.

@zanieb zanieb added bug Something isn't working releases Related to building and distributing release artifacts of uv labels Sep 3, 2024
@telljmc
Copy link

telljmc commented Sep 5, 2024

I am encountering a similar issue on a Macbook Pro M3. I installed uv using the curl command. When I attempt to update I encounter the following:

❯ uv self update
info: Checking for updates...
error: The installation failed. Output from the installer:
downloading uv 0.4.3 aarch64-apple-darwin

I tried the "--verbose" flag which resulted in exactly the same message. I tried closing everything and rebooting with the same result. Next up will be to do an uninstall and fresh reinstall.

To update, I finally had to uninstall uv 0.3.5 and then install uv 0.4.3. Today I tried to update to uv 0.4.5 and I am running into the same issue as previous:

❯ uv self update
info: Checking for updates...
error: The installation failed. Output from the installer:
downloading uv 0.4.5 aarch64-apple-darwin

@lucas-labs
Copy link

lucas-labs commented Oct 27, 2024

I'm having the same issue in Windows (installed via standalone script).

$ uv self update

warning: Self-update is only available for uv binaries installed via the
standalone installation scripts.

If you installed uv with pip, brew, or another package manager, update uv with
`pip install --upgrade`, `brew upgrade`, or similar.

[EDIT]

I managed to run self update successfully thanks to a comment here #6417.

I was using cache-dir to change the cache directory to another drive. Apparently I also removed the entire %LOCALAPPDATA%\uv directory after doing so, instead of just removing %LOCALAPPDATA%\uv\cache. Therefore, I had removed %LOCALAPPDATA%\uv\uv-receipt.json file in the process (running uv self update -v gave me the hint... it couldn't find the receipt). I mannually created the receipt file and it all started working again.

@leehanchung
Copy link

Got the same problem.

$ uv self update
warning: Self-update is only available for `uv` binaries installed via the standalone installation scripts.

If you installed `uv` with `pip`, `brew`, or another package manager, update `uv` with `pip install --upgrade`, `brew upgrade`, or similar.

$ uv self update -v
DEBUG receipt is not for this executable; assuming `uv` was installed via a package manager
warning: Self-update is only available for `uv` binaries installed via the standalone installation scripts.

If you installed `uv` with `pip`, `brew`, or another package manager, update `uv` with `pip install --upgrade`, `brew upgrade`, or similar.
han@VitaminC:~/courses/cs194-llm-agents$ uv cache prune
Pruning cache at: /home/han/.cache/uv
Removed 9 files (3.2MiB)
$ uv self update -v
DEBUG receipt is not for this executable; assuming `uv` was installed via a package manager
warning: Self-update is only available for `uv` binaries installed via the standalone installation scripts.

If you installed `uv` with `pip`, `brew`, or another package manager, update `uv` with `pip install --upgrade`, `brew upgrade`, or similar.

Seems like its something related to receipt?

@zanieb
Copy link
Member

zanieb commented Nov 27, 2024

@leehanchung Generally that means that some other uv on the system was installed after the one that you're using. What does where uv output?

@leehanchung
Copy link

@leehanchung Generally that means that some other uv on the system was installed after the one that you're using. What does where uv output?

found the issue. i had the old ~/.cargo/bin/uv. removed and working now.

thanks!!

zanieb added a commit that referenced this issue Dec 4, 2024
…#9487)

Attempts to improve confusing messaging in cases like
#6774 (comment),
when the receipt is for a different uv executable.

```
❯ cargo run --all-features -q -- self update
warning: Self-update is only available for uv binaries installed via the standalone installation scripts.

The current executable is at `/Users/zb/workspace/uv/target/debug/uv` but the standalone installer was used to install uv to `/Users/zb/.cargo`. Are multiple copies of uv installed?
```

Requires axodotdev/axoupdater#221
Closes #6774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working releases Related to building and distributing release artifacts of uv
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants