jdx/mise

`uv` fails to recognize Python installations from `mise sync python --uv`

kiangti opened this issue · 2 comments

Describe the bug
It seems that uv cannot recognize the symbolic link created by mise sync python --uv in ~/.local/share/uv/python

To Reproduce

~ mise ls python
Tool    Version  Source                      Requested
python  3.11.11
python  3.13.1   ~/.config/mise/config.toml  latest
➜  ~ mise sync python --uv
mise WARN  failed to resolve toolset: [~/.config/mise/config.toml] thefuck@latest: thefuck not found in mise tool registry
➜  ~ ls -al ~/.local/share/uv/python
total 16
drwxr-xr-x  5 liangyi  staff   160 Dec 18 04:55 .
drwxr-xr-x  4 liangyi  staff   128 Dec 18 04:55 ..
-rw-r--r--@ 1 liangyi  staff  6148 Dec 18 04:55 .DS_Store
lrwxr-xr-x  1 liangyi  staff    56 Dec 18 04:55 cpython-3.11.11-macos-x86_64-gnu -> /Users/liangyi/.local/share/mise/installs/python/3.11.11
lrwxr-xr-x  1 liangyi  staff    55 Dec 18 04:55 cpython-3.13.1-macos-x86_64-gnu -> /Users/liangyi/.local/share/mise/installs/python/3.13.1
➜  ~ mise install thefuck
error: No interpreter found for Python 3.11 in managed installations or search path
mise ERROR uv failed
error: No interpreter found for Python 3.11 in managed installations or search path
mise ERROR failed to install pipx:thefuck@3.32
mise ERROR uv exited with non-zero status: exit code 2
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
➜  ~ uv python list
cpython-3.13.1-macos-x86_64-none    .local/share/mise/installs/python/3.13.1/bin/python3.13
cpython-3.13.1-macos-x86_64-none    .local/share/mise/installs/python/3.13.1/bin/python3 -> python3.13
cpython-3.13.1-macos-x86_64-none    .local/share/mise/installs/python/3.13.1/bin/python -> .local/share/mise/installs/python/3.13.1/bin/python3
cpython-3.9.6-macos-x86_64-none     /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -> ../../Library/Frameworks/Python3.framework/Versions/3.9/bin/python3
[settings]
experimental = true

[alias]
thefuck = "pipx:thefuck"

[env]
UV_PYTHON_DOWNLOADS = "never"

[tool]
python = "latest"
thefuck = { version = "latest", uvx_args = "--python 3.11" }

Expected behavior
Python versions installed by mise should be detected by uv python list. This means I can install thefuck using uvx_args = "--python 3.11", even when Python 3.11 is not activated in the configuration

mise doctor output

version: 2024.12.12 macos-x64 (2d9d289 2024-12-16)
activated: yes
shims_on_path: no

build_info:
  Target: x86_64-apple-darwin
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Mon, 16 Dec 2024 18:22:36 +0000
  Rust Version: rustc 1.83.0 (90b35a623 2024-11-26)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

dirs:
  cache: ~/Library/Caches/mise
  config: ~/.config/mise
  data: ~/.local/share/mise
  shims: ~/.local/share/mise/shims
  state: ~/.local/state/mise

config_files:
  ~/.config/mise/config.toml

backends:
  aqua
  asdf
  cargo
  core
  gem
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  flutter  https://github.com/oae/asdf-flutter.git#d736066
  maven    https://github.com/mise-plugins/asdf-maven.git#c872214
  tuist    https://github.com/asdf-community/asdf-tuist.git#44c87b2

toolset:
  aqua:astral-sh/uv@0.5.9
  aqua:cloudflare/cloudflared@2024.12.1
  aqua:firebase/firebase-tools@13.29.1
  asdf:flutter@stable
  asdf:maven@3.9.9
  asdf:tuist@4.37.0
  core:bun@1.1.38
  core:go@1.23.4
  core:java@temurin-21.0.5+11.0.LTS
  core:node@23.4.0
  core:python@3.13.1
  core:ruby@3.3.6
  core:rust@1.83.0
  go:github.com/metacubex/geo/cmd/geo@master
  pipx:git+https://github.com/5ec1cff/payload-dumper.git@master
  pipx:thefuck@3.32     (missing)
  ubi:ajeetdsouza/zoxide@0.9.6
  ubi:jdx/usage@1.6.0
  ubi:watchexec/watchexec@2.2.1

path:
  ~/Library/Android/sdk/tools
  ~/Library/Android/sdk/emulator
  ~/Library/Android/sdk/cmdline-tools/latest/bin
  ~/Library/Android/sdk/platform-tools
  ~/.spicetify
  ~/PersonalSpace/Exec/ffmpeg
  ~/.local/share/mise/installs/usage/1.6.0/bin
  ~/.local/share/mise/installs/watchexec/2.2.1/bin
  ~/.local/share/mise/installs/bun/1.1.38/bin
  ~/.local/share/mise/installs/flutter/stable/bin
  ~/.local/share/mise/installs/go/1.23.4/bin
  ~/.local/share/mise/installs/java/temurin-21.0.5+11.0.LTS/bin
  ~/.local/share/mise/installs/node/23.4.0/bin
  ~/.local/share/mise/installs/python/3.13.1/bin
  ~/.local/share/mise/installs/ruby/3.3.6/bin
  ~/.cargo/bin
  ~/.local/share/mise/installs/maven/3.9.9/bin
  ~/.local/share/mise/installs/tuist/4.37.0/bin
  ~/.local/share/mise/installs/uv/0.5.9/uv-x86_64-apple-darwin
  ~/.local/share/mise/installs/cloudflared/2024.12.1
  ~/.local/share/mise/installs/firebase/13.29.1
  ~/.local/share/mise/installs/geo/master/bin
  ~/.local/share/mise/installs/payload-dumper/master/bin
  ~/.local/share/mise/installs/zoxide/0.9.6/bin
  ~/.local/bin
  /usr/local/opt/curl/bin
  /usr/local/bin
  /System/Cryptexes/App/usr/bin
  /usr/bin
  /bin
  /usr/sbin
  /sbin
  /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
  /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
  /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
  /Library/Apple/usr/bin
  /Applications/Wireshark.app/Contents/MacOS
  /Applications/iTerm.app/Contents/Resources/utilities

env_vars:
  MISE_SHELL=zsh

settings:
  experimental          true                ~/.config/mise/config.toml
  trusted_config_paths  ["~/PersonalSpace"] ~/.config/mise/config.toml

No problems found

Additional context

jdx commented

I noticed this behavior too, though it worked for some runtimes and not others. Wasn't sure why.