macOS brew hangs on building Python@3.9 (3.9.1_7)

Viewed 358

When I try to upgrade python@3.9 on my brew installation, the installation formula hangs. I see it hangs at [19/43] test_functools but there are many "failed (env changed)" and a few malloc crashes before the hang. How can I fix this?

I ran brew upgrade python@3.9 —verbose and the end of the output was the following:

Python build finished successfully! The necessary bits to build these optional modules were not found: ossaudiodev spwd
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time

running build_scripts

creating build/scripts-3.9

copying and adjusting /private/tmp/python-3.9-20210409-53277-1nw4z9j/Python-3.9.4/Tools/scripts/pydoc3 -> build/scripts-3.9

copying and adjusting /private/tmp/python-3.9-20210409-53277-1nw4z9j/Python-3.9.4/Tools/scripts/idle3 -> build/scripts-3.9

copying and adjusting /private/tmp/python-3.9-20210409-53277-1nw4z9j/Python-3.9.4/Tools/scripts/2to3 -> build/scripts-3.9

changing mode of build/scripts-3.9/pydoc3 from 644 to 755

changing mode of build/scripts-3.9/idle3 from 644 to 755

changing mode of build/scripts-3.9/2to3 from 644 to 755

renaming build/scripts-3.9/pydoc3 to build/scripts-3.9/pydoc3.9

renaming build/scripts-3.9/idle3 to build/scripts-3.9/idle3.9

renaming build/scripts-3.9/2to3 to build/scripts-3.9/2to3-3.9

touch profile-gen-stamp

Next, run the profile task to generate the profile information.

/Applications/Xcode.app/Contents/Developer/usr/bin/make run_profile_task

LLVM_PROFILE_FILE="code-%p.profclangr" DYLD_FRAMEWORK_PATH=/private/tmp/python-3.9-20210409-53277-1nw4z9j/Python-3.9.4 ./python -m test --pgo || true

0:00:00 load avg: 49.21 Run tests sequentially

0:00:00 load avg: 49.21 [ 1/43] test_array

0:00:09 load avg: 43.18 [ 2/43] test_base64

0:00:12 load avg: 43.18 [ 3/43] test_binascii -- test_base64 failed (env changed)

0:00:13 load avg: 43.18 [ 4/43] test_binop

0:00:13 load avg: 40.44 [ 5/43] test_bisect

0:00:14 load avg: 40.44 [ 6/43] test_bytes

0:00:41 load avg: 30.43 [ 7/43] test_bz2 -- test_bytes failed (env changed)

0:00:53 load avg: 27.29 [ 8/43] test_cmath

0:00:55 load avg: 26.46 [ 9/43] test_codecs

0:01:14 load avg: 22.72 [10/43] test_collections

0:01:23 load avg: 21.78 [11/43] test_complex

0:01:26 load avg: 21.64 [12/43] test_dataclasses

0:01:31 load avg: 21.59 [13/43] test_datetime

0:02:14 load avg: 16.20 [14/43] test_decimal -- test_datetime passed in 43.1 sec python(62860,0x7fffa14ec380) malloc: *** mach_vm_map(size=842105263157895168) failed (error code=3)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug python(62860,0x7fffa14ec380) malloc: *** mach_vm_map(size=842105263157895168) failed (error code=3)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug

python(62860,0x7fffa14ec380) malloc: *** mach_vm_map(size=421052631578947584) failed (error code=3)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug

python(62860,0x7fffa14ec380) malloc: *** mach_vm_map(size=421052631578947584) failed (error code=3)

*** error: can't allocate region

*** set a breakpoint in malloc_error_break to debug

0:03:22 load avg: 15.19 [15/43] test_difflib -- test_decimal passed in 1 min 7 sec

0:03:33 load avg: 14.72 [16/43] test_embed

0:04:35 load avg: 12.80 [17/43] test_float -- test_embed passed in 1 min 1 sec

0:04:39 load avg: 13.13 [18/43] test_fstring

0:04:46 load avg: 12.96 [19/43] test_functools

^C

One sec, cleaning up...

ln -s ../Cellar/python@3.9/3.9.1_7/bin/2to3 2to3

ln -s ../Cellar/python@3.9/3.9.1_7/bin/2to3-3.9 2to3-3.9

ln -s ../Cellar/python@3.9/3.9.1_7/bin/easy_install-3.9 easy_install-3.9

ln -s ../Cellar/python@3.9/3.9.1_7/bin/idle3 idle3

ln -s ../Cellar/python@3.9/3.9.1_7/bin/idle3.9 idle3.9

ln -s ../Cellar/python@3.9/3.9.1_7/bin/pip3 pip3

ln -s ../Cellar/python@3.9/3.9.1_7/bin/pip3.9 pip3.9

ln -s ../Cellar/python@3.9/3.9.1_7/bin/pydoc3 pydoc3

ln -s ../Cellar/python@3.9/3.9.1_7/bin/pydoc3.9 pydoc3.9

ln -s ../Cellar/python@3.9/3.9.1_7/bin/python3 python3

ln -s ../Cellar/python@3.9/3.9.1_7/bin/python3-config python3-config

ln -s ../Cellar/python@3.9/3.9.1_7/bin/python3.9 python3.9

ln -s ../Cellar/python@3.9/3.9.1_7/bin/python3.9-config python3.9-config

ln -s ../Cellar/python@3.9/3.9.1_7/bin/wheel3 wheel3

ln -s ../../../Cellar/python@3.9/3.9.1_7/share/man/man1/python3.1 python3.1

ln -s ../../../Cellar/python@3.9/3.9.1_7/share/man/man1/python3.9.1 python3.9.1

ln -s ../../Cellar/python@3.9/3.9.1_7/lib/pkgconfig/python-3.9-embed.pc python-3.9-embed.pc

ln -s ../../Cellar/python@3.9/3.9.1_7/lib/pkgconfig/python-3.9.pc python-3.9.pc

ln -s ../../Cellar/python@3.9/3.9.1_7/lib/pkgconfig/python3-embed.pc python3-embed.pc

ln -s ../../Cellar/python@3.9/3.9.1_7/lib/pkgconfig/python3.pc python3.pc mkdir -p /usr/local/Frameworks/Python.framework

ln -s ../../Cellar/python@3.9/3.9.1_7/Frameworks/Python.framework/Headers Headers

ln -s ../../Cellar/python@3.9/3.9.1_7/Frameworks/Python.framework/Python Python

ln -s ../../Cellar/python@3.9/3.9.1_7/Frameworks/Python.framework/Resources Resources mkdir -p /usr/local/Frameworks/Python.framework/Versions

ln -s ../../../Cellar/python@3.9/3.9.1_7/Frameworks/Python.framework/Versions/3.9 3.9

ln -s ../../../Cellar/python@3.9/3.9.1_7/Frameworks/Python.framework/Versions/Current Current

0 Answers
Related