Using pyenv and python 3.6.9 I am able to get my application to work on a MacOS 10.14. However, when installing wxPython on a 3.8.0 version of python that had been installed with pyenv I hit the following error:
...
checking for SDK directory /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk... exists
checking if C compiler (gcc -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.6) works with SDK/version options... yes
checking if C++ compiler (g++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.6) works with SDK/version options... configure: error: in `/private/var/folders/f6/<random_string>/T/pip-install-<rand_str>/wxpython/build/wxbld':
configure: error: no. Try a different SDK
See `config.log' for more details
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "build.py", line 1325, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/private/var/folders/f6/<random_string>/T/pip-install-<rand_str>/wxpython/buildtools/build_wxwidgets.py", line 372, in main
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
File "/private/var/folders/f6/<random_string>/T/pip-install-<rand_str>/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0m2.108s)
Finished command: build (0m2.108s)
Command '"/Users/<username>/.pyenv/versions/3.8.0/envs/<project>/bin/python3.8" -u build.py build' failed with exit code 1.
The installation procedure was:
env CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" PYTHON_CONFIGURE_OPTS="--enable-framework=$(pyenv root)/versions/3.8.0 CC=clang" pyenv install 3.8.0
pyenv virtualenv 3.8.0 <project>
pyenv activate <project>
pip install wxpython
As I mentioned this went smoothly with 3.6.9. I have also tried this on a Linux VM (Mint 19) with pyenv and python 3.8.0, 3.7.4 and everything went smoothly.
I am normally develop on Linux, so any advice would be greatfully received,
Cheers,
Mark