jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.83k stars 280 forks source link

Pipx install instructions not working: no such file or directory #2457

Closed eproxus closed 1 month ago

eproxus commented 2 months ago

Describe the bug When following the instructions to get the pipx backend working, an No such file or directory (os error 2) error is issued when trying to install something.

To Reproduce

$ mise use -g python
$ pip install --user pipx
$ mise install pipx:psf/black
mise failed to execute command: pipx install git+https://github.com/psf/black.git@22.1.0
mise No such file or directory (os error 2)
mise Run with --verbose or MISE_VERBOSE=1 for more information

This is also true for normal PyPi packages.

Expected behavior Packages install correctly.

mise doctor output

version: 2024.8.6 macos-arm64 (2024-08-12)
activated: yes
shims_on_path: no

build_info: 
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Mon, 12 Aug 2024 07:50:25 +0000
  Rust Version: rustc 1.80.1 (3f5fd8dd4 2024-08-06) (Homebrew)
  Profile: release

shell: 
  /opt/homebrew/bin/fish
  fish, version 3.7.1

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

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

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi

plugins: 
  bun        (core)
  deno       (core)
  elixir     https://github.com/asdf-vm/asdf-elixir.git#a4c42e1
  erlang     (core)
  go         (core)
  java       (core)
  node       (core)
  php        https://github.com/asdf-community/asdf-php.git#1eaf4de
  python     (core)
  rebar      https://github.com/Stratus3D/asdf-rebar.git#4af0770
  ruby       (core)
  usage      https://github.com/jdx/mise-usage.git#fe3888a
  watchexec  https://github.com/nyrst/asdf-watchexec.git#b667a08
  zig        (core)

toolset: 
  bun@1.1.22            
  elixir@1.17.2-otp-27  
  erlang@27.0.1         
  erlang@26.2.5.2       
  erlang@25.3.2.13      
  go@1.22.6             
  node@22.6.0           
  python@3.12.5         
  watchexec@2.1.2       
  usage@0.3.0           
  npm:prettier@3.3.2    
  npm:@usebruno/cli@1.20.0  
  rebar@3.23.0          
  pipx:py-natpmp@0.2.5  (missing)
  npm:worm-scraper@6.0.0  
  zig@0.13.0            

env_vars: 
  MISE_SHELL=fish

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "~/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
No problems found

Additional context I had it working before. Then I started over from scratch using mise uninstall python --all and following the instructions above.

qbedard commented 2 months ago

Might be the same as https://github.com/jdx/mise/issues/2458. Does mise upgrade work?

engeir commented 2 months ago

I think I saw the same issue as this, which does seem related indeed to #2458. To reproduce:

$ cd ~
$ curl https://mise.run | sh
$ echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
$ . .bashrc
$ mise --version
2024.8.15 linux-x64 (14bab0e 2024-08-28)
$ mise settings set experimental true
$ mise settings set pipx_uvx true
$ mise use -g uv
$ mise use -g pipx:black  # this works
$ nvim ~/.config/mise/config.toml  # edit by including for example "pipx:poetry" = "latest" in tools
$ cat ~/.config/mise/config.toml
[tools]
uv = "latest"
"pipx:black" = "latest"
"pipx:poetry" = "latest"
neovim = "latest"

[settings]
experimental = true
pipx_uvx = true
$ mise i
mise failed to execute command: uv tool install poetry==1.8.3
mise No such file or directory (os error 2)
mise Run with --verbose or MISE_VERBOSE=1 for more information
$ mise upgrade
Resolved 38 packages in 1.13s
Prepared 36 packages in 1.30s
Installed 38 packages in 22ms
 + build==1.2.1
 + cachecontrol==0.14.0
 + certifi==2024.7.4
 + cffi==1.17.0
 + charset-normalizer==3.3.2
 + cleo==2.1.0
 + crashtest==0.4.1
 + cryptography==43.0.0
 + distlib==0.3.8
 + dulwich==0.21.7
 + fastjsonschema==2.20.0
 + filelock==3.15.4
 + idna==3.8
 + installer==0.7.0
 + jaraco-classes==3.4.0
 + jeepney==0.8.0
 + keyring==24.3.1
 + more-itertools==10.4.0
 + msgpack==1.0.8
 + packaging==24.1
 + pexpect==4.9.0
 + pkginfo==1.11.1
 + platformdirs==4.2.2
 + poetry==1.8.3
 + poetry-core==1.9.0
 + poetry-plugin-export==1.8.0
 + ptyprocess==0.7.0
 + pycparser==2.22
 + pyproject-hooks==1.1.0
 + rapidfuzz==3.9.6
 + requests==2.32.3
 + requests-toolbelt==1.0.0
 + secretstorage==3.3.3
 + shellingham==1.5.4
 + tomlkit==0.13.2
 + trove-classifiers==2024.7.2
 + urllib3==2.2.2
 + virtualenv==20.26.3
Installed 1 executable: poetry
mise pipx:poetry@1.8.3  ✓ installed