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

pyenv failing to install python 3.9.0 in apple m1 #1876

Closed
6 tasks
nashid opened this issue Apr 15, 2021 · 7 comments
Closed
6 tasks

pyenv failing to install python 3.9.0 in apple m1 #1876

nashid opened this issue Apr 15, 2021 · 7 comments
Labels
by-design the reported behavior is as intended

Comments

@nashid
Copy link

nashid commented Apr 15, 2021

Description

  • Platform information (e.g. Ubuntu Linux 16.04): big sur
  • OS architecture (e.g. amd64): mac m1
  • pyenv version:pyenv 1.2.26
  • Python version: Python 2.7.16
  • C Compiler information (e.g. gcc 7.3): 12.0.0
  • Please attach verbose build log as gist
pyenv install 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...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.2.3 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/4v/r9560h1j7_l2ndbd8hx7hqhc0000gp/T/python-build.20210415124204.28210
Results logged to /var/folders/4v/r9560h1j7_l2ndbd8hx7hqhc0000gp/T/python-build.20210415124204.28210.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.

Already looked into #1767 which is not resolving my issue.

@nashid
Copy link
Author

nashid commented Apr 15, 2021

Same issue while trying to install python 2:

pyenv install 2.7.14
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-2.7.14.tar.xz...
-> https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz
Installing Python-2.7.14...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.2.3 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/4v/r9560h1j7_l2ndbd8hx7hqhc0000gp/T/python-build.20210415125645.78158
Results logged to /var/folders/4v/r9560h1j7_l2ndbd8hx7hqhc0000gp/T/python-build.20210415125645.78158.log

Last 10 log lines:
checking for uintptr_t... yes
checking size of uintptr_t... 8
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 for --enable-toolbox-glue... yes
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found.  Stop.

@xight
Copy link

xight commented Apr 16, 2021

python 3.9.0 don't seem to support Apple Silicon.
according to release note, python support Apple Silicon from 3.9.1.

3.9.1 is the first version of Python to support macOS 11 Big Sur. With Xcode 11 and later it is now possible to build “Universal 2” binaries which work on Apple Silicon.

https://www.python.org/downloads/release/python-391/

@tanbirsohail
Copy link

tanbirsohail commented Apr 16, 2021

I installed 3.9.4 on my MacBook pro with m1 chip using pyenv 1.2.26 and it worked fine.
Universal2 binaries are available from 3.9.1 onwards.

sohail@MacProM1 ~ % pyenv install 3.9.4
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.4.tar.xz...
-> https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tar.xz
Installing Python-3.9.4...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.4 to /Users/sohail/.pyenv/versions/3.9.4
sohail@MacProM1 ~ % pyenv versions

  • system (set by /Users/sohail/.pyenv/version)
    3.9.4
    sohail@MacProM1 ~ %

@hipertracker
Copy link

hipertracker commented Nov 24, 2021

There are no universal binaries. I can't install any Python version with pyenv on MacBook Pro M1Max. Homebrew has no this problem (it loads a binary package). Pyenv fails on M1 and M1Max chip.

❯ pyenv install 3.9.9
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.9.tar.xz...
-> https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz
Installing Python-3.9.9...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 12.0.1 using python-build 2.2.2-1-gf2925393)

Inspect or clean up the working tree at /var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937
Results logged to /var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937.log

Last 10 log lines:
  File "/private/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937/Python-3.9.9/Lib/ensurepip/__init__.py", line 206, in _main
    return _bootstrap(
  File "/private/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937/Python-3.9.9/Lib/ensurepip/__init__.py", line 125, in _bootstrap
    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/private/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937/Python-3.9.9/Lib/ensurepip/__init__.py", line 34, in _run_pip
    return subprocess.run([sys.executable, "-c", code], check=True).returncode
  File "/private/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937/Python-3.9.9/Lib/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/private/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/python-build.20211124012220.58937/Python-3.9.9/python.exe', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/tmpuca6vv7h/setuptools-58.1.0-py3-none-any.whl\', \'/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/tmpuca6vv7h/pip-21.2.4-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/var/folders/vk/2_81bjsd7hbbyml7rv8s15z00000gn/T/tmpuca6vv7h\', \'--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

@sambowenhughes
Copy link

Why is this closed?

@heyong2013
Copy link

Same issue while trying to install python 2:

pyenv install 2.7.14
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-2.7.14.tar.xz...
-> https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz
Installing Python-2.7.14...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.2.3 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/4v/r9560h1j7_l2ndbd8hx7hqhc0000gp/T/python-build.20210415125645.78158
Results logged to /var/folders/4v/r9560h1j7_l2ndbd8hx7hqhc0000gp/T/python-build.20210415125645.78158.log

Last 10 log lines:
checking for uintptr_t... yes
checking size of uintptr_t... 8
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 for --enable-toolbox-glue... yes
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found.  Stop.

my M2 macbook has the same problem.

@native-api
Copy link
Member

CPython supports Arm64 since 3.8.10 and 3.9.1.

So this is normal behavior.

@native-api native-api added the by-design the reported behavior is as intended label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by-design the reported behavior is as intended
Projects
None yet
Development

No branches or pull requests

8 participants