Skip to content

Instantly share code, notes, and snippets.

@DavidAntliff
Last active August 15, 2019 02:41
Show Gist options
  • Save DavidAntliff/fe89c0a8a223defb113f7c27f6c74a8c to your computer and use it in GitHub Desktop.
Save DavidAntliff/fe89c0a8a223defb113f7c27f6c74a8c to your computer and use it in GitHub Desktop.
Build Python 3.7.3 via pyenv on MacOS Mojave with matplotlib support

Errors about undefined symbols

Something something __Py_UnixMain _main python.o:

$ brew uninstall binutils

Xcode headers are not properly installed.

Error is:

zipimport.ZipImportError: can't decompress data; zlib not available

Install the headers manually:

$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Python build must be a Framework build

To use the MacOSX matplotlib backend:

$ env PYTHON_CONFIGURE_OPTS="--enable-framework CC=clang" pyenv install 3.7.3

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