Python build FAILED (OS X 10.14.6 using python-build 20180424)
See original GitHub issueHello. When I install by bundled_installer, bundled_installer fails to install Python with the following error.
************************************************************
5. Installing Python 3.7.2. This step may take a few minutes
************************************************************
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew
BUILD FAILED (OS X 10.14.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/rg/jn_7wts95hv3m8dm6g_68t8c0000gn/T/python-build.20190810153428.85076
Results logged to /var/folders/rg/jn_7wts95hv3m8dm6g_68t8c0000gn/T/python-build.20190810153428.85076.log
Last 10 log lines:
File "/private/var/folders/rg/jn_7wts95hv3m8dm6g_68t8c0000gn/T/python-build.20190810153428.85076/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/private/var/folders/rg/jn_7wts95hv3m8dm6g_68t8c0000gn/T/python-build.20190810153428.85076/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/private/var/folders/rg/jn_7wts95hv3m8dm6g_68t8c0000gn/T/python-build.20190810153428.85076/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/var/folders/rg/jn_7wts95hv3m8dm6g_68t8c0000gn/T/python-build.20190810153428.85076/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
Exiting due to failure
The following message is output to the logfile.
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_dbm _gdbm _hashlib
_sqlite3 _ssl _uuid
nis ossaudiodev spwd
zlib
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
Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381
I want to know how to install python successfully.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:22 (1 by maintainers)
Top Results From Across the Web
PyEnv BUILD FAILED installing Python on MacOS
This steps helped me solving BUILD FAILED (OS X 13.0.1 using python-build 20180424).
Read more >Not Able to Build Some Versions of Python on M1 at 12.3.1
I trying to build older version of python such as 3.6, 3.7, 3.8 using pyenv and having build failures. I am on apple...
Read more >build failed (os x 12.3.1 using python-build 20180424)
python -build: use zlib from xcode sdk BUILD FAILED (OS X 12.0.1 using python-build 20180424) I tried pyenv install 3.8.10 after reading @btilongnguyen...
Read more >Zipimport.Zipimporterror: Can't Decompress Data; Zlib Not ...
BUILD FAILED Kali kalirolling using pythonbuild 1.2.71g71902168 Inspect or clean up ... from homebrew BUILD FAILED OS X 10.14.6 using pythonbuild 20180424 ......
Read more >pyenv - Bountysource
BUILD FAILED (Kali kali-rolling using python-build 1.2.7-1-g71902168) ... BUILD FAILED (OS X 10.14.6 using python-build 20180424) Inspect or clean up the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the confusion is in the setting of
CFLAGS
If I do the following in a shell, I am able to get things working, but the way the docs express it, it does not work.
From the cloned repo dir:
In case the above solutions did not work for someone, this is what worked for me: After installing using:
brew install zlib openssl readline
I set an additional flag:CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)"
The complete command to install the cli was:CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib" CPPFLAGS="-I$(brew --prefix zlib)/include" CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" ./scripts/bundled_installer