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.
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,
I have changes in the pipeline for 3.8 compatibility, which should be done in a few days. I’m not sure yet if I’ll make new wheels for 4.0.6 or just go ahead and push out a general 4.0.7 release. The changes for a 4.0.7 release are in the backports branch and PR if anybody is interested in getting a preview. As implied by the name, it’s mostly backports from the master branch.
Some of the changes in the backports branch change how the SDK is selected, and also sets the minimum version to 10.9, so that may help with these errors. Otherwise, there really isn’t anything that is Python version specific up to this point in the build. The messages above are coming from the wxWidgets configure script, which has nothing to do with Python at all, other than the .py scripts that are launching the wxWidgets build. So, IOW, it seems very odd that it would fail at this point with Python 3.8 and not with other Python versions.
Just to double-check, could you try it with a stock Python 3.8 from the standard installer instead of a pyenv?
FTR, my development machine has Xcode 9.4.1 running on it, and the machine where the releases are built has Xcode 8.something, if I remember correctly. So if your Xcode command-line tools are based on Xcode 10 or 11 then that could be a possible source of the problem as well, although it’s been years since I’ve run into issues that were due solely to Xcode or SDK, especially at the configuration part of the wxWidgets build.
I should mention that so far I’ve found only a few very small things that need to be changed for 3.8, and one medium sized issue. (Python 3.8 seems to be setting the locale on Windows now, whereas it left it completely alone previously…)
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 `/Users/<username>/Documents/Code/Phoenix/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 1360, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/Users/<username>/Documents/Code/Phoenix/buildtools/build_wxwidgets.py", line 372, in main
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
File "/Users/<username>/Documents/Code/Phoenix/buildtools/build_wxwidgets.py", line 85, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0m1.826s)
Finished command: build (0m1.826s)
If I do a pip install:
pip3 install --user -e .
This looks to succeed, but without any of the checking steps. But when using Gooey for a user interface it complains that the wx._core module does not exist.
I could try using an older version of Xcode command line tools to see if that has any effect.
I got a same error on macOS 10.15 with python 3.8.0 when pip install wxpython 4.0.6:
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/r9/6dt175713_bblj6ty9gmrbwm0000gn/T/pip-install-zk1fce5e/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/r9/6dt175713_bblj6ty9gmrbwm0000gn/T/pip-install-zk1fce5e/wxpython/buildtools/build_wxwidgets.py", line 372, in main
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
File "/private/var/folders/r9/6dt175713_bblj6ty9gmrbwm0000gn/T/pip-install-zk1fce5e/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0m7.28s)
Finished command: build (0m7.28s)
Command '"/Users/<myname>/.pyenv/versions/3.8.0/bin/python" -u build.py build' failed with exit code 1.
This is specific to Win10, not MacOS, so apologies on trying to not open an unnecessary thread.
Just tried installing wxPython on Win10/Python 3.8.0 and got the following (had it install successfully on Python 3.7.4):
C:\WINDOWS\system32>pip3 install -U wxPython
Collecting wxPython
Using cached https://files.pythonhosted.org/packages/9a/a1/9c081e04798eb134b63def3db121a6e4436e1d84e76692503deef8e75423/wxPython-4.0.6.tar.gz
Requirement already satisfied, skipping upgrade: numpy in c:\users\stepher\appdata\local\programs\python\python38\lib\site-packages (from wxPython) (1.17.3)
Requirement already satisfied, skipping upgrade: pillow in c:\users\stepher\appdata\local\programs\python\python38\lib\site-packages (from wxPython) (6.2.1)
Requirement already satisfied, skipping upgrade: six in c:\users\stepher\appdata\local\programs\python\python38\lib\site-packages (from wxPython) (1.12.0)
Building wheels for collected packages: wxPython
Building wheel for wxPython (setup.py) … error
ERROR: Command errored out with exit status 1:
command: ‘c:\users\stepher\appdata\local\programs\python\python38\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\stepher\AppData\Local\Temp\pip-install-9cmk5grm\wxPython\setup.py’”’“‘; file=’”‘“‘C:\Users\stepher\AppData\Local\Temp\pip-install-9cmk5grm\wxPython\setup.py’”’“';f=getattr(tokenize, '”‘“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ bdist_wheel -d ‘C:\Users\stepher\AppData\Local\Temp\pip-wheel-54bxpvap’ --python-tag cp38
cwd: C:\Users\stepher\AppData\Local\Temp\pip-install-9cmk5grm\wxPython
Complete output (14 lines):
running bdist_wheel
running build
Traceback (most recent call last):
File “build.py”, line 30, in
import pathlib2
ModuleNotFoundError: No module named ‘pathlib2’
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
–skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
ERROR: Failed building wheel for wxPython
Running setup.py clean for wxPython
Failed to build wxPython
Installing collected packages: wxPython
Running setup.py install for wxPython … error
ERROR: Command errored out with exit status 1:
command: ‘c:\users\stepher\appdata\local\programs\python\python38\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\stepher\AppData\Local\Temp\pip-install-9cmk5grm\wxPython\setup.py’”’“‘; file=’”‘“‘C:\Users\stepher\AppData\Local\Temp\pip-install-9cmk5grm\wxPython\setup.py’”’“';f=getattr(tokenize, '”‘“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ install --record ‘C:\Users\stepher\AppData\Local\Temp\pip-record-1dggsyix\install-record.txt’ --single-version-externally-managed --compile
cwd: C:\Users\stepher\AppData\Local\Temp\pip-install-9cmk5grm\wxPython
Complete output (14 lines):
running install
running build
Traceback (most recent call last):
File “build.py”, line 30, in
import pathlib2
ModuleNotFoundError: No module named ‘pathlib2’
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
–skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
Also be aware that if you do not have the proper Microsoft compilers installed then you will not be able to build from source, which is what pip is trying to do.
The binaries for a 4.0.7 release, including Python 3.8 wheels for Windows and OSX, are currently building, so please be patient for a little while longer. They should be on PyPI by tomorrow.
Your posting showed up just as I hit send So, hi and thank you for your reply. I’ll chk out PyPI for the update s/w. Cheers…
@Mark
Yeah. I knew that coming in (and prefaced my posting as such) so apologies if I distracted things here a bit. However, when I realized who @Robin was I’m hoping I got his attention
I appreciate your suggestion but while I was able to install pathlib2
Successfully installed pathlib2-2.35
I still couldn’t get wxPython reintalled.Guess I’ll have to go back to Python 3.7.4 until things are updated for 3.8.0.