asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
643 stars 55 forks source link

Error during python installation with python 3.11.6 Macbook Pro Core i5 Sonoma 14.3 #181

Open Ameausoone opened 5 months ago

Ameausoone commented 5 months ago

Provide environment information

❯ asdf info
No preset version installed for command python3
Please install a version by running one of the following:

asdf install python 3.11.6

or add one of the following versions in your config file at /Users/ANTOINE/Projects/decathlon/cpe/core-cpe/cpe-bootstrap-root/.tool-versions
python 3.9.6
python 3.10.7
OS:
Darwin FRL-C02DT1AJML7L 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:28:58 PST 2023; root:xnu-10002.81.5~7/RELEASE_X86_64 x86_64 i386 Darwin

SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)

BASH VERSION:
5.2.21(1)-release

ASDF VERSION:
v0.13.1

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/ANTOINE/.asdf
ASDF_DIR=/usr/local/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/ANTOINE/.asdfrc

ASDF INSTALLED PLUGINS:
ansible                      ssh://git@github.com/Bleacks/asdf-ansible-plugin.git master 0983b14
bats                         ssh://git@github.com/timgluz/asdf-bats.git main 299551f
conftest                     ssh://git@github.com/looztra/asdf-conftest.git master ea56f93
deno                         ssh://git@github.com/asdf-community/asdf-deno.git master 87442fe
editorconfig-checker         ssh://git@github.com/gabitchov/asdf-editorconfig-checker.git master 1bfc7d5
flux2                        ssh://git@github.com/tablexi/asdf-flux2.git master 771755e
fluxctl                      ssh://git@github.com/stefansedich/asdf-fluxctl.git master c2ecce0
gcloud                       ssh://git@github.com/jthegedus/asdf-gcloud.git main 4a2cbed
golang                       ssh://git@github.com/asdf-community/asdf-golang.git master 33b1f6d
helm                         ssh://git@github.com/Antiarchitect/asdf-helm.git master 87eef5a
hub                          ssh://git@github.com/vixus0/asdf-hub.git master b3cc81a
hugo                         ssh://git@github.com/NeoHsu/asdf-hugo.git master 125ce37
kubectl                      ssh://git@github.com/Banno/asdf-kubectl.git master 11ac5c3
kustomize                    ssh://git@github.com/Banno/asdf-kustomize.git master 2efaa38
ls-lint                      ssh://git@github.com/Ameausoone/asdf-ls-lint main 73d478a
packer                       ssh://git@github.com/asdf-community/asdf-hashicorp.git master c44c314
poetry                       ssh://git@github.com/asdf-community/asdf-poetry.git master 7ea77b0
python                       ssh://git@github.com/danhper/asdf-python.git master 57ef777
shellcheck                   ssh://git@github.com/luizm/asdf-shellcheck.git master 9d46274
shfmt                        ssh://git@github.com/luizm/asdf-shfmt.git master f893252
terraform-docs               ssh://git@github.com/looztra/asdf-terraform-docs.git master 3ec72e5
terraform-validator          ssh://git@github.com/looztra/asdf-terraform-validator.git master ce2ecf2
terraform                    ssh://git@github.com/Banno/asdf-hashicorp.git master d91aced
terragrunt                   ssh://git@github.com/ohmer/asdf-terragrunt.git main 4a6651a
tflint                       ssh://git@github.com/skyzyx/asdf-tflint.git master 37e7eb9

asdf-python plugin is up to date : 57ef777

To Reproduce

When I run the installation of python : $ asdf install python 3.11.6

Describe the Bug

I got this error :

❯ asdf install python 3.11.6
No preset version installed for command python3
Please install a version by running one of the following:

asdf install python 3.11.6

or add one of the following versions in your config file at /Users/ANTOINE/Projects/decathlon/cpe/core-cpe/cpe-bootstrap-root/.tool-versions
python 3.9.6
python 3.10.7
python-build 3.11.6 /Users/ANTOINE/.asdf/installs/python/3.11.6
python-build: use openssl@3 from homebrew
python-build: use readline from homebrew
Downloading Python-3.11.6.tar.xz...
-> https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tar.xz
Installing Python-3.11.6...
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 14.3 using python-build 2.3.35-11-g9908daf8)

Inspect or clean up the working tree at /var/folders/xf/9396c37n7rvcbnq9f9x6n50r0000gp/T/python-build.20240130092149.37477
Results logged to /var/folders/xf/9396c37n7rvcbnq9f9x6n50r0000gp/T/python-build.20240130092149.37477.log

Last 10 log lines:
                /usr/local/opt/coreutils/libexec/gnubin/install -c -s Mac/pythonw /Users/ANTOINE/.asdf/installs/python/3.11.6/bin/python3.11; \
        fi
if test "3.11" != "3.11"; then \
                if test -f /Users/ANTOINE/.asdf/installs/python/3.11.6/bin/python3.11 -o -h /Users/ANTOINE/.asdf/installs/python/3.11.6/bin/python3.11; \
                then rm -f /Users/ANTOINE/.asdf/installs/python/3.11.6/bin/python3.11; \
                fi; \
                (cd /Users/ANTOINE/.asdf/installs/python/3.11.6/bin; ln python3.11 python3.11); \
        fi
zsh:1: parse error near `fi'
make: *** [altbininstall] Error 1

Expected Behaviour

It should install asdf install python 3.11.6

jdsalaro commented 4 months ago

I'm experiencing this as well while installing Python 3.9.0 on Sonoma and M1

user@system myfolder % asdf install python 3.9.0
python-build 3.9.0 /Users/user/.asdf/installs/python/3.9.0
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.0.tar.xz...
-> https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Installing Python-3.9.0...
patching file Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
patching file configure
patching file configure.ac
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 14.3.1 using python-build 2.3.36-3-gf9a2bb81)

Inspect or clean up the working tree at /var/folders/5_/fggkfxqs06v0ybv5f_lhlky80000gn/T/python-build.20240221163109.97984
Results logged to /var/folders/5_/fggkfxqs06v0ybv5f_lhlky80000gn/T/python-build.20240221163109.97984.log

Last 10 log lines:
checking size of _Bool... 1
checking size of off_t... 8
checking whether to enable large file support... no
checking size of time_t... 8
checking for pthread_t... yes
checking size of pthread_t... 8
checking size of pthread_key_t... 8
checking whether pthread_key_t is compatible with int... no
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found.  Stop.
user@system folder %
jdsalaro commented 4 months ago

oddly enough, 3.9.1 through 3.9.18 can be installed without issue.

@Ameausoone , it's probably too late or not relevant but you might be able to install another minor version that works for your usecase.