Hello,
first of all: I’m a noob - I guess. I tried to install a minecraft world editor (Amulet). It failed because of a wheel problem for wxPython. I then tried to build wxPython on Fedora 39 because the wheel doesn’t exist for F39 so far, only F38. I followed this guide here: Building wxPython for Linux via Pip | wxPython
And I installed all these packages with these commands:
sudo dnf install python3.9
sudo dnf install python3-devtools
sudo dnf install gtk3
sudo dnf install gtk3-devel
sudo dnf install gstreamer1
sudo dnf install gstreamer1-devel
sudo dnf install gstreamer1-plugins-base
sudo dnf install gstreamer1-plugins-base-devel
sudo dnf install ghc-GLUT
sudo dnf install ghc-GLUT-devel
sudo dnf install webkit2gtk4.0
sudo dnf install webkit2gtk4.0-devel
sudo dnf install libjpeg
sudo dnf install libjpeg-devel
sudo dnf install libpng
sudo dnf install libpng-devel
sudo dnf install libtiff
sudo dnf install libtiff-devel
sudo yum install SDL* (includes packages & devel packages)
sudo dnf install libnotify
sudo dnf install libnotify-devel
sudo dnf install libSM
sudo dnf install libSM-devel
sudo dnf update
My build-log:
> Processing ./wxPython-4.2.1.tar.gz
> File was already downloaded /home/annatar/tmp-build-wxpython/wxPython-4.2.1.tar.gz
> Preparing metadata (setup.py): started
> Running command python setup.py egg_info
> running egg_info
> creating /tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info
> writing /tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/PKG-INFO
> writing dependency_links to /tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/dependency_links.txt
> writing entry points to /tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/entry_points.txt
> writing requirements to /tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/requires.txt
> writing top-level names to /tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/top_level.txt
> writing manifest file '/tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/SOURCES.txt'
> reading manifest file '/tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> no previously-included directories found matching 'docs/sphinx/build'
> warning: no previously-included files matching '.git' found under directory 'wx'
> warning: no previously-included files matching '*.pyc' found under directory 'wx'
> warning: no previously-included files matching '__pycache__' found under directory 'wx'
> adding license file 'LICENSE.txt'
> writing manifest file '/tmp/pip-pip-egg-info-m7ar2kvq/wxPython.egg-info/SOURCES.txt'
> Preparing metadata (setup.py): finished with status 'done'
> Collecting pillow (from wxPython==4.2.1)
> File was already downloaded /home/annatar/tmp-build-wxpython/pillow-10.2.0-cp39-cp39-manylinux_2_28_x86_64.whl
> Collecting six (from wxPython==4.2.1)
> File was already downloaded /home/annatar/tmp-build-wxpython/six-1.16.0-py2.py3-none-any.whl
> Collecting numpy (from wxPython==4.2.1)
> File was already downloaded /home/annatar/tmp-build-wxpython/numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
> Building wheels for collected packages: wxPython
> Building wheel for wxPython (setup.py): started
> Running command python setup.py bdist_wheel
> 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.
>
> "/home/annatar/tmp-build-wxpython/builder_py/bin/python3.9" -u build.py build
> /tmp/pip-req-build-rrh8uphx/build.py:43: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
> from distutils.dep_util import newer, newer_group
> Will build using: "/home/annatar/tmp-build-wxpython/builder_py/bin/python3.9"
> 3.9.18 (main, Dec 18 2023, 00:00:00)
> [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)]
> Python's architecture is 64bit
> cfg.VERSION: 4.2.1
>
> Running command: build
> Running command: build_wx
> wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
> Configure options: ['--enable-unicode', '--with-gtk=3', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
> /tmp/pip-req-build-rrh8uphx/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
> checking build system type... x86_64-pc-linux-gnu
> checking host system type... x86_64-pc-linux-gnu
> checking for toolkit... gtk
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking whether we are using the Intel C compiler... no
> checking how to run the C preprocessor... gcc -E
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking whether gcc needs -traditional... no
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking whether we are using the Intel C++ compiler... no
> checking whether we are using the Sun C++ compiler... no
> checking for ar... ar
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for langinfo.h... yes
> checking for wchar.h... yes
> checking for sys/select.h... yes
> checking for cxxabi.h... yes
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking size of short... 2
> checking size of void *... 8
> checking size of int... 4
> checking size of long... 8
> checking size of size_t... 8
> checking size of long long... 8
> checking size of wchar_t... 4
> checking for va_copy... yes
> checking for _FILE_OFFSET_BITS value needed for large files... 64
> checking if large file support is available... yes
> checking for _LARGEFILE_SOURCE value needed for large files... no
> checking whether byte ordering is bigendian... no
> checking for std::wstring in <string>... yes
> checking for std::istream... yes
> checking for std::ostream... yes
> checking for type_traits... yes
> checking for __sync_xxx_and_fetch builtins... yes
> checking for libraries directories... /usr/lib64
> checking for cos... no
> checking for floor... no
> checking if floating point functions link without -lm... no
> checking for sin... yes
> checking for ceil... yes
> checking if floating point functions link with -lm... yes
> checking for strtoull... yes
> checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for LIBPCRE... checking whether pcre submodule exists... yes
> checking for zlib.h >= 1.1.4... yes
> checking for zlib.h... (cached) yes
> checking for deflate in -lz... yes
> checking for png.h > 0.90... yes
> checking for png.h... (cached) yes
> checking for png_sig_cmp in -lpng... yes
> checking for jpeglib.h... yes
> checking for jpeg_read_header in -ljpeg... yes
> checking for jbg_dec_init in -ljbig... no
> checking for LIBTIFF... not found via pkg-config
> checking for tiffio.h... yes
> checking for TIFFError in -ltiff... yes
> checking for expat.h... no
> configure: WARNING: system expat library not found, will use built-in instead
> checking whether expat.h file exists... yes
> checking for gcc option to accept ISO C99... none needed
> checking for LIBCURL... not found
> checking for GTK+ version...
> checking for pkg-config... (cached) /home/linuxbrew/.linuxbrew/bin/pkg-config
> checking pkg-config is at least version 0.16... yes
> checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gtk+-3.0.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'gtk+-3.0' found
> Package gthread-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gthread-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'gthread-2.0' found
> no
> *** Could not run GTK+ test program, checking why...
> *** The test program failed to compile or link. See the file config.log for the
> *** exact error that occurred. This usually means GTK+ is incorrectly installed.
> configure: error:
> The development files for GTK+ were not found. For GTK+ 2, please
> ensure that pkg-config is in the path and that gtk+-2.0.pc is
> installed. For GTK+ 1.2 please check that gtk-config is in the path,
> and that the version is 1.2.3 or above. Also check that the
> libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
> --libs' are in the LD_LIBRARY_PATH or equivalent.
>
> Error running configure
> ERROR: failed building wxWidgets
> Traceback (most recent call last):
> File "/tmp/pip-req-build-rrh8uphx/build.py", line 1563, in cmd_build_wx
> wxbuild.main(wxDir(), build_options)
> File "/tmp/pip-req-build-rrh8uphx/buildtools/build_wxwidgets.py", line 379, in main
> exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
> File "/tmp/pip-req-build-rrh8uphx/buildtools/build_wxwidgets.py", line 72, in exitIfError
> raise builder.BuildError(msg)
> buildtools.builder.BuildError: Error running configure
> Finished command: build_wx (0m8.257s)
> Finished command: build (0m8.257s)
> Command '"/home/annatar/tmp-build-wxpython/builder_py/bin/python3.9" -u build.py build' failed with exit code 1.
> error: subprocess-exited-with-error
>
> × python setup.py bdist_wheel did not run successfully.
> │ exit code: 1
> ╰─> See above for output.
>
> note: This error originates from a subprocess, and is likely not a problem with pip.
> full command: /home/annatar/tmp-build-wxpython/builder_py/bin/python3.9 -u -c '
> exec(compile('"'"''"'"''"'"'
> # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
> #
> # - It imports setuptools before invoking setup.py, to enable projects that directly
> # import from `distutils.core` to work with newer packaging standards.
> # - It provides a clear error message when setuptools is not installed.
> # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
> # setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
> # manifest_maker: standard file '"'"'-c'"'"' not found".
> # - It generates a shim setup.py, for handling setup.cfg-only projects.
> import os, sys, tokenize
>
> try:
> import setuptools
> except ImportError as error:
> print(
> "ERROR: Can not execute `setup.py` since setuptools is not available in "
> "the build environment.",
> file=sys.stderr,
> )
> sys.exit(1)
>
> __file__ = %r
> sys.argv[0] = __file__
>
> if os.path.exists(__file__):
> filename = __file__
> with tokenize.open(__file__) as f:
> setup_py_code = f.read()
> else:
> filename = "<auto-generated setuptools caller>"
> setup_py_code = "from setuptools import setup; setup()"
>
> exec(compile(setup_py_code, filename, "exec"))
> '"'"''"'"''"'"' % ('"'"'/tmp/pip-req-build-rrh8uphx/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-68pfq0lp
> cwd: /tmp/pip-req-build-rrh8uphx/
> Building wheel for wxPython (setup.py): finished with status 'error'
> ERROR: Failed building wheel for wxPython
> Running setup.py clean for wxPython
> Running command python setup.py clean
> running clean
> 'build/lib.linux-x86_64-cpython-39' does not exist -- can't clean it
> 'build/bdist.linux-x86_64' does not exist -- can't clean it
> 'build/scripts-3.9' does not exist -- can't clean it
> Failed to build wxPython
> ERROR: Failed to build one or more wheels
Any idea how to fix it? Or even any “step by step” solution?