Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed when installing python 3.10.14 on macOS Sonoma 14.1.1 with M3 chip #188

Open
devsheva opened this issue May 27, 2024 · 1 comment

Comments

@devsheva
Copy link

Provide environment information

OS:
Darwin Mateos-MacBook-Pro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:32:52 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T8122 arm64

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

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.14.0-ccdd47d

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/mateo/.asdf
ASDF_DIR=/Users/mateo/.asdf
ASDF_CONFIG_FILE=/Users/mateo/.asdfrc

ASDF INSTALLED PLUGINS:
python                       https://github.com/danhper/asdf-python.git master 5e277e2
ruby                         https://github.com/asdf-vm/asdf-ruby.git master a4c7dc7

To Reproduce

I just ran asdf install python latest:3.10.

Describe the Bug

Build fails with this error
ModuleNotFoundError: No module named '_posixsubprocess'

Full backtrace
python-build 3.10.14 /Users/mateo/.asdf/installs/python/3.10.14
python-build: use [email protected] from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.14.tar.xz...
-> https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tar.xz
Installing Python-3.10.14...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 14.1.1 using python-build 2.4.1-2-g0e0ca096)

Inspect or clean up the working tree at /var/folders/ct/5z32007s04z29v36fhnqq21c0000gn/T/python-build.20240527190531.53055
Results logged to /var/folders/ct/5z32007s04z29v36fhnqq21c0000gn/T/python-build.20240527190531.53055.log

Last 10 log lines:
  File "/private/var/folders/ct/5z32007s04z29v36fhnqq21c0000gn/T/python-build.20240527190531.53055/Python-3.10.14/Lib/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/private/var/folders/ct/5z32007s04z29v36fhnqq21c0000gn/T/python-build.20240527190531.53055/Python-3.10.14/Lib/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/private/var/folders/ct/5z32007s04z29v36fhnqq21c0000gn/T/python-build.20240527190531.53055/Python-3.10.14/Lib/ensurepip/__init__.py", line 4, in <module>
    import subprocess
  File "/private/var/folders/ct/5z32007s04z29v36fhnqq21c0000gn/T/python-build.20240527190531.53055/Python-3.10.14/Lib/subprocess.py", line 74, in <module>
    import _posixsubprocess
ModuleNotFoundError: No module named '_posixsubprocess'
make: *** [install] Error 1

Expected Behaviour

Expected to install the python version without problems.

@devsheva
Copy link
Author

I solved this by doing export ARCHFLAGS="-arch arm64" as mentioned here #118, but I don't know why it worked cause I don't have an Intel Chip but Apple Silicon one. Leaving this open for explanations if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant