Hey, I checked the version and it said 3.8.8 for python.
I tried running the code you wrote above, and I apologize for the long text here -
python3.8 -mpip install wxpython
Collecting wxpython
Using cached wxPython-4.2.1.tar.gz (73.7 MB)
Requirement already satisfied: pillow in /opt/anaconda3/lib/python3.8/site-packages (from wxpython) (8.2.0)
Requirement already satisfied: six in /opt/anaconda3/lib/python3.8/site-packages (from wxpython) (1.15.0)
Requirement already satisfied: numpy in /opt/anaconda3/lib/python3.8/site-packages (from wxpython) (1.20.1)
Building wheels for collected packages: wxpython
Building wheel for wxpython (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/setup.py'"'"'; __file__='"'"'/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/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 /private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-wheel-6p4uae4f
cwd: /private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/
Complete output (43 lines):
running bdist_wheel
running build
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.
"/opt/anaconda3/bin/python3.8" -u build.py build
Will build using: "/opt/anaconda3/bin/python3.8"
3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ]
Python's architecture is 64bit
cfg.VERSION: 4.2.1
Running command: build
Running command: build_wx
wxWidgets build options: ['--wxpython', '--unicode', '--osx_cocoa', '--mac_universal_binary=default']
Universal Capable: False
Architectures: x86_64
Configure options: ['--enable-unicode', '--with-osx_cocoa', '--enable-universal_binary=x86_64', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-macosx-version-min=10.10', '--with-libjpeg=builtin', '--with-libpng=builtin', '--with-libtiff=builtin', '--with-regex=builtin']
/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/ext/wxWidgets/configure --enable-unicode --with-osx_cocoa --enable-universal_binary=x86_64 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-macosx-version-min=10.10 --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-regex=builtin
checking build system type... x86_64-apple-darwin21.5.0
checking host system type... x86_64-apple-darwin21.5.0
checking for toolkit... osx_cocoa
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/build/wxbld':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "build.py", line 1563, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/buildtools/build_wxwidgets.py", line 379, in main
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
File "/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/buildtools/build_wxwidgets.py", line 72, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0.868s)
Finished command: build (0.869s)
Command '"/opt/anaconda3/bin/python3.8" -u build.py build' failed with exit code 1.
----------------------------------------
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: /opt/anaconda3/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/setup.py'"'"'; __file__='"'"'/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-record-a9caki6z/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/wxpython
cwd: /private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/
Complete output (43 lines):
running install
running build
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.
"/opt/anaconda3/bin/python3.8" -u build.py build
Will build using: "/opt/anaconda3/bin/python3.8"
3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ]
Python's architecture is 64bit
cfg.VERSION: 4.2.1
Running command: build
Running command: build_wx
wxWidgets build options: ['--wxpython', '--unicode', '--osx_cocoa', '--mac_universal_binary=default']
Universal Capable: False
Architectures: x86_64
Configure options: ['--enable-unicode', '--with-osx_cocoa', '--enable-universal_binary=x86_64', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-macosx-version-min=10.10', '--with-libjpeg=builtin', '--with-libpng=builtin', '--with-libtiff=builtin', '--with-regex=builtin']
/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/ext/wxWidgets/configure --enable-unicode --with-osx_cocoa --enable-universal_binary=x86_64 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-macosx-version-min=10.10 --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-regex=builtin
checking build system type... x86_64-apple-darwin21.5.0
checking host system type... x86_64-apple-darwin21.5.0
checking for toolkit... osx_cocoa
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/build/wxbld':
configure: error: C compiler cannot create executables
See `config.log' for more details
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "build.py", line 1563, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/buildtools/build_wxwidgets.py", line 379, in main
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
File "/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/buildtools/build_wxwidgets.py", line 72, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0.547s)
Finished command: build (0.548s)
Command '"/opt/anaconda3/bin/python3.8" -u build.py build' failed with exit code 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/setup.py'"'"'; __file__='"'"'/private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-install-6y3hkw5e/wxpython_43932be50df44041aa80ea7084fae69c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ks/jyd3_h812rsbkv9nmfrhb4km0000gn/T/pip-record-a9caki6z/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/wxpython Check the logs for full command output.
(base) python --version
Python 3.8.8