Unfortunately, wxPython 2.8 is not available in the default Ubuntu 18.04 repositories anymore, and installing it from a third-party repository would not be recommended. However, you can still install wxPython 4, which is the current version, and should also work fine with most applications that were designed for wxPython 2.8. Here are the steps to install wxPython 4 on Ubuntu 18.04:
apt update
sudo apt upgrade
apt install python3-dev build-essential libgtk-3-dev libjpeg-dev libtiff-dev libaudio-dev libpng-dev libavcodec-dev
~/Downloads
wget https://files.pythonhosted.org/packages/4a/4d/be94ee64f02ba7b64285c62af42b7782d2d53da5aafa107c781cc4893d5f/wxPython-4.1.1.tar.gz
-xvf wxPython-4.1.1.tar.gz
cd wxPython-4.1.1
apt install python3-setuptools python3-wheel python3-pip python3-sphinx python3-wxgtk4.0-dev
pip3 install --user -r requirements.txt
build.py build_ext --gtk3 --jobs=2
sudo python3 setup.py install
-c "import wx; print(wx.version())"
This should output the version number of wxPython that you just installed. You can now use wxPython in your Python applications on Ubuntu 18.04.
Asked: 2022-01-16 11:00:00 +0000
Seen: 9 times
Last updated: Mar 27 '22