CP4 pip install error (conda python 3.8 environment on Ubuntu 18.04.5)

I am experiencing an error durring pip install following instructions here: Source installation (Linux) · CellProfiler/CellProfiler Wiki · GitHub

Repro steps:

  • create new python 3.8 conda environment
    conda create -n python38_cellprofiler4 python=3.8

  • activate it
    conda activate python38_cellprofiler4

  • attempt pip installing cell profiler
    pip install cellprofiler

  • For me, at this point I had to individually pip install numpy and mysqlclient because the previous command failed on those modules.
    pip install -U numpy
    sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
    pip install mysqlclient==1.4.6

  • I then retried installing cell profiler, and got an error while building a wheel for wxPython:

   command: /home/chrishu/.conda/envs/python38_cellprofiler4/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/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 /tmp/pip-wheel-t8jadbmy
       cwd: /tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/
  Complete output (139 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.
  
  "/home/chrishu/.conda/envs/python38_cellprofiler4/bin/python" -u build.py build
  Will build using: "/home/chrishu/.conda/envs/python38_cellprofiler4/bin/python"
  3.8.8 (default, Feb 24 2021, 21:46:12)
  [GCC 7.3.0]
  Python's architecture is 64bit
  cfg.VERSION: 4.1.0
  
  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-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/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... /bin/grep
  checking for egrep... /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 whether the compiler supports variadic macros... 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_fetch_and_add and __sync_sub_and_fetch builtins... yes
  checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
  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... /usr/bin/pkg-config
  checking pkg-config is at least version 0.9.0... yes
  configure: WARNING: Defaulting to the builtin regex library for Unicode build.
  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... no
  configure: WARNING: system jpeg library not found, will use built-in instead
  checking lzma.h usability... yes
  checking lzma.h presence... yes
  checking for lzma.h... yes
  checking for lzma_code in -llzma... yes
  checking for jbg_dec_init in -ljbig... no
  checking for LIBTIFF... not found via pkg-config
  checking for tiffio.h... no
  configure: WARNING: system tiff library not found, will use built-in instead
  checking for expat.h... yes
  checking if expat.h is valid C++ header... yes
  checking for XML_ParserCreate in -lexpat... yes
  checking for GTK+ version...
  checking for pkg-config... (cached) /usr/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
  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 "build.py", line 1471, in cmd_build_wx
      wxbuild.main(wxDir(), build_options)
    File "/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/buildtools/build_wxwidgets.py", line 372, in main
      exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
    File "/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/buildtools/build_wxwidgets.py", line 85, in exitIfError
      raise builder.BuildError(msg)
  buildtools.builder.BuildError: Error running configure
  Finished command: build_wx (0m42.128s)
  Finished command: build (0m42.128s)
  Command '"/home/chrishu/.conda/envs/python38_cellprofiler4/bin/python" -u build.py build' failed with exit code 1.
  ----------------------------------------
  ERROR: Failed building wheel for wxPython
  Running setup.py clean for wxPython
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491059 sha256=3ac3dd6fc3fa9857bceaf26008647e0890915920c5128ec131e26943142b86b5
  Stored in directory: /home/chrishu/.cache/pip/wheels/dc/60/6e/4065a304166540b5d88483ecb277b3058c02efe93bc0e33732
Successfully built centrosome prokaryote python-javabridge pyzmq future
Failed to build wxPython
Installing collected packages: six, urllib3, python-dateutil, jmespath, pyparsing, Pillow, kiwisolver, decorator, cycler, botocore, tifffile, scipy, s3transfer, PyWavelets, packaging, networkx, matplotlib, imageio, scikit-image, python-javabridge, future, deprecation, boto3, threadpoolctl, pyzmq, python-bioformats, psutil, prokaryote, MarkupSafe, joblib, idna, h5py, docutils, chardet, centrosome, wxPython, sentry-sdk, scikit-learn, requests, mahotas, Jinja2, inflect, cellprofiler-core, cellprofiler
    Running setup.py install for wxPython ... error
    ERROR: Command errored out with exit status 1:
     command: /home/chrishu/.conda/envs/python38_cellprofiler4/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1w8tcytp/install-record.txt --single-version-externally-managed --compile --install-headers /home/chrishu/.conda/envs/python38_cellprofiler4/include/python3.8/wxPython
         cwd: /tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/
    Complete output (139 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.
    
    "/home/chrishu/.conda/envs/python38_cellprofiler4/bin/python" -u build.py build
    Will build using: "/home/chrishu/.conda/envs/python38_cellprofiler4/bin/python"
    3.8.8 (default, Feb 24 2021, 21:46:12)
    [GCC 7.3.0]
    Python's architecture is 64bit
    cfg.VERSION: 4.1.0
    
    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-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/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... /bin/grep
    checking for egrep... /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 whether the compiler supports variadic macros... 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_fetch_and_add and __sync_sub_and_fetch builtins... yes
    checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
    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... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    configure: WARNING: Defaulting to the builtin regex library for Unicode build.
    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... no
    configure: WARNING: system jpeg library not found, will use built-in instead
    checking lzma.h usability... yes
    checking lzma.h presence... yes
    checking for lzma.h... yes
    checking for lzma_code in -llzma... yes
    checking for jbg_dec_init in -ljbig... no
    checking for LIBTIFF... not found via pkg-config
    checking for tiffio.h... no
    configure: WARNING: system tiff library not found, will use built-in instead
    checking for expat.h... yes
    checking if expat.h is valid C++ header... yes
    checking for XML_ParserCreate in -lexpat... yes
    checking for GTK+ version...
    checking for pkg-config... (cached) /usr/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
    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 "build.py", line 1471, in cmd_build_wx
        wxbuild.main(wxDir(), build_options)
      File "/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/buildtools/build_wxwidgets.py", line 372, in main
        exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
      File "/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/buildtools/build_wxwidgets.py", line 85, in exitIfError
        raise builder.BuildError(msg)
    buildtools.builder.BuildError: Error running configure
    Finished command: build_wx (0m38.801s)
    Finished command: build (0m38.801s)
    Command '"/home/chrishu/.conda/envs/python38_cellprofiler4/bin/python" -u build.py build' failed with exit code 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/chrishu/.conda/envs/python38_cellprofiler4/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uoafkqbq/wxpython_8e81c9374d414c31a14ce68de010c5bd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1w8tcytp/install-record.txt --single-version-externally-managed --compile --install-headers /home/chrishu/.conda/envs/python38_cellprofiler4/include/python3.8/wxPython Check the logs for full command output.

Hi @chrishu,

I am using Ubuntu20.04 & even I faced problems in getting cellprofiler with Conda environment but couldn’t resolve the issue.
Rather I tried creating virtual python3 environment & installed Cellprofiler. Works perfectly.

Regards,

Lakshmi
www.wakoautomation.com

Thanks @lakshmi . I tried a pyenv environment and hit the same error. I am trying to avoid upgrading my system python3 version, which is 3.6 (I believe that’s what I would need to do to try a virtual env). That may indeed what I try next though, since I got the same error using a pyenv environment:

Running setup.py install for wxPython ... error
    ERROR: Command errored out with exit status 1:
     command: /home/chrishu/.pyenv/versions/3.8.0/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uvzs0vov/wxPython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uvzs0vov/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 /tmp/pip-record-wtzxk8w0/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-uvzs0vov/wxPython/
    Complete output (139 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.
    
    "/home/chrishu/.pyenv/versions/3.8.0/bin/python3.8" -u build.py build
    Will build using: "/home/chrishu/.pyenv/versions/3.8.0/bin/python3.8"
    3.8.0 (default, Feb 26 2021, 12:28:46)
    [GCC 7.5.0]
    Python's architecture is 64bit
    cfg.VERSION: 4.1.0
    
    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-install-uvzs0vov/wxPython/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... /bin/grep
    checking for egrep... /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 whether the compiler supports variadic macros... 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_fetch_and_add and __sync_sub_and_fetch builtins... yes
    checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
    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... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    configure: WARNING: Defaulting to the builtin regex library for Unicode build.
    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... no
    configure: WARNING: system jpeg library not found, will use built-in instead
    checking lzma.h usability... yes
    checking lzma.h presence... yes
    checking for lzma.h... yes
    checking for lzma_code in -llzma... yes
    checking for jbg_dec_init in -ljbig... no
    checking for LIBTIFF... not found via pkg-config
    checking for tiffio.h... no
    configure: WARNING: system tiff library not found, will use built-in instead
    checking for expat.h... yes
    checking if expat.h is valid C++ header... yes
    checking for XML_ParserCreate in -lexpat... yes
    checking for GTK+ version...
    checking for pkg-config... (cached) /usr/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
    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 "build.py", line 1471, in cmd_build_wx
        wxbuild.main(wxDir(), build_options)
      File "/tmp/pip-install-uvzs0vov/wxPython/buildtools/build_wxwidgets.py", line 372, in main
        exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
      File "/tmp/pip-install-uvzs0vov/wxPython/buildtools/build_wxwidgets.py", line 85, in exitIfError
        raise builder.BuildError(msg)
    buildtools.builder.BuildError: Error running configure
    Finished command: build_wx (0m3.268s)
    Finished command: build (0m3.268s)
    Command '"/home/chrishu/.pyenv/versions/3.8.0/bin/python3.8" -u build.py build' failed with exit code 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/chrishu/.pyenv/versions/3.8.0/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uvzs0vov/wxPython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uvzs0vov/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 /tmp/pip-record-wtzxk8w0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Do you have gtk installed, per our Ubuntu source install instructions? I suspect that may be the issue based on your stack trace.