I am trying to install python 3.8.18
using asdf
.
I am using this command
asdf install python 3.8.18
However, I keep getting this error
python-build 3.8.18 /Users/frank/.asdf/installs/python/3.8.18
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.18.tar.xz...
-> https://www.python.org/ftp/python/3.8.18/Python-3.8.18.tar.xz
Installing Python-3.8.18...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 15.1 using python-build 2.4.19-1-g61c0f25e)
Inspect or clean up the working tree at /var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503
Results logged to /var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503.log
Last 10 log lines:
File "/private/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503/Python-3.8.18/Lib/ensurepip/__init__.py", line 209, in _main
return _bootstrap(
File "/private/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503/Python-3.8.18/Lib/ensurepip/__init__.py", line 128, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503/Python-3.8.18/Lib/ensurepip/__init__.py", line 37, in _run_pip
return subprocess.run(cmd, check=True).returncode
File "/private/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503/Python-3.8.18/Lib/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/private/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/python-build.20241124182312.89503/Python-3.8.18/python.exe', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/tmpc28ood9w/setuptools-56.0.0-py3-none-any.whl\', \'/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/tmpc28ood9w/pip-23.0.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/var/folders/yp/d4ldg85x4pv4lw72m44bpzr40000gn/T/tmpc28ood9w\', \'--root\', \'/\', \'--upgrade\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [install] Error 1
I have tried running
brew install openssl@1.1 readline xz zlib
, asdf update
and asdf plugin update python
but the error still persists and I am not still sure why
I can see BUILD FAILED (OS X 15.1 using python-build 2.4.19-1-g61c0f25e)
in the error message you posted, so it looks like you are using a Macbook
. In my experience, most of these type of errors are always related to the architecture of the system. I am guessing you are trying to install python on an arm
architecture (i.e, M1, M2, etc). I would advise trying to install this on an intel
architecture instead.
So basically, open your terminal and:
env /usr/bin/arch -x86_64 /bin/zsh --login
asdf install python 3.8.18 again