jdx/mise

`Mise install python` not working

swirle13 opened this issue · 4 comments

Describe the bug

Brand new macbook pro with M3, attempting to install mise for python env management. I receive a curl: (22) The requested URL returned error: 404 when attempting to run mise install python

See Additional Context for versions of potentially related packages.

The following is the verbose output from mise install python --verbose:

[DEBUG] ARGS: /Users/matthew.johnson/.local/bin/mise install python --verbose
[DEBUG] Config {
    Config Files: [],
}
[DEBUG] ToolRequestSet.build(15.791µs): ToolRequestSet:

[INFO] mise hint use multiple versions simultaneously with mise use python@3.12 python@3.11
[INFO] mise hint disable this hint with mise settings set disable_hints python_multi or all with mise settings set disable_hints "*"
[DEBUG] install_versions: python@latest
[DEBUG] no precompiled python found for 3.12.6
[DEBUG] Updating python-build in /Users/matthew.johnson/Library/Caches/mise/python/pyenv
[DEBUG] current branch for "/Users/matthew.johnson/Library/Caches/mise/python/pyenv": master
[DEBUG] updating /Users/matthew.johnson/Library/Caches/mise/python/pyenv to master
[DEBUG] $ git -C /Users/matthew.johnson/Library/Caches/mise/python/pyenv -c safe.directory=/Users/matthew.johnson/Library/Caches/mise/python/pyenv fetch --prune --update-head-ok origin master:master
[DEBUG] current sha for "/Users/matthew.johnson/Library/Caches/mise/python/pyenv": 1cabb6e02b1408b783038627a4ad1d30eabb7f10
[DEBUG] $ git -C /Users/matthew.johnson/Library/Caches/mise/python/pyenv -c safe.directory=/Users/matthew.johnson/Library/Caches/mise/python/pyenv -c advice.detachedHead=false -c advice.objectNameWarning=false checkout --force master
[DEBUG] current sha for "/Users/matthew.johnson/Library/Caches/mise/python/pyenv": 1cabb6e02b1408b783038627a4ad1d30eabb7f10
Running python-build
[DEBUG] $ ~/Library/Caches/mise/python/pyenv/plugins/python-build/bin/python-build 3.12.6 /Users/matthew.johnson/.local/share/mise/installs/python/3.12.6 --verbose
/var/folders/92/_6m39gfx2t7g5wmgdk1fwv440000gp/T/python-build.20240909100110.19047 ~
Downloading openssl-3.3.2.tar.gz...
HTTP/1.1 404 Not Found
Connection: close
Content-Length: 9379
Server: GitHub.com
Content-Type: text/html; charset=utf-8
permissions-policy: interest-cohort=()
Access-Control-Allow-Origin: *
ETag: "64d39a40-24a3"
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'
x-proxy-cache: MISS
X-GitHub-Request-Id: B30F:3702CE:46D8BBF:48C7DE5:66DF2020
Accept-Ranges: bytes
Age: 2483
Date: Mon, 09 Sep 2024 17:01:10 GMT
Via: 1.1 varnish
X-Served-By: cache-sjc1000126-SJC
X-Cache: HIT
X-Cache-Hits: 0
X-Timer: S1725901270.282944,VS0,VE1
Vary: Accept-Encoding
X-Fastly-Request-ID: ea85947b5ab701d9d9d7c591ad69a8ceb463fc87
-> https://www.openssl.org/source/openssl-3.3.2.tar.gz
curl: (22) The requested URL returned error: 404
error: failed to download openssl-3.3.2.tar.gz
BUILD FAILED (OS X 14.4 using python-build 2.4.12-1-g1cabb6e0)
Results logged to /var/folders/92/_6m39gfx2t7g5wmgdk1fwv440000gp/T/python-build.20240909100110.19047.log
Last 10 log lines:
Date: Mon, 09 Sep 2024 17:01:10 GMT
Via: 1.1 varnish
X-Served-By: cache-sjc1000126-SJC
X-Cache: HIT
X-Cache-Hits: 0
X-Timer: S1725901270.282944,VS0,VE1
Vary: Accept-Encoding
X-Fastly-Request-ID: ea85947b5ab701d9d9d7c591ad69a8ceb463fc87
curl: (22) The requested URL returned error: 404
[ERROR] ~/Library/Caches/mise/python/pyenv/plugins/python-build/bin/python-build failed
Error:
   0: ~/Library/Caches/mise/python/pyenv/plugins/python-build/bin/python-build exited with non-zero status: exit code 1

Location:
   src/cmd.rs:394

Version:
   2024.9.0 macos-arm64 (c83103c 2024-09-05)

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

To Reproduce

Run mise install python

Expected behavior

Installation of the latest python module with no failure.

mise doctor output

version: 2024.9.0 macos-arm64 (c83103c 2024-09-05)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Thu, 5 Sep 2024 00:42:43 +0000
  Rust Version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
  Profile: release

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

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

config_files:


backends:
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:


toolset:


env_vars:
  MISE_SHELL=zsh

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf = true
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_hints = []
  disable_tools = []
  experimental = false
  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
  pipx_uvx = 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
  use_versions_host = true
  verbose = false
  vfox = 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

My local git credentials are set.

$ which openssl
/usr/bin/openssl

$ /usr/bin/openssl version
LibreSSL 3.3.6

$ which python3
/usr/bin/python3

$ python3 -V
Python 3.9.6

Fetching the source url for v3.3.2 from https://openssl-library.org/source/ provides the following url: https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz

Curling that url via curl -sS -O https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz successfully downloads the file locally. Perhaps there's an issue in the script with attempting to download a file from a url that doesn't exist?

Upstream issue. https://www.openssl.org/source/openssl-3.3.2.tar.gz 404s rather than redirecting to the GitHub release like https://www.openssl.org/source/openssl-3.3.1.tar.gz does.

@jeremy thanks for the clarification. Any idea of how I can modify the install to tell it to get 3.3.1 or use my existing openssl LibreSSL 3.3.6? Is this something mise supports passing along to python-build?

@swirle13 That's something to work out via python-build. Looks like you can install openssl using Homebrew and it'll take priority.

Upstream:

Upstream fix in pyenv/pyenv#3059