Ask Your Question
1

What is the process for installing wxPython 2.8 on Ubuntu 18.04?

asked 2022-01-16 11:00:00 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-03-27 20:00:00 +0000

bukephalos gravatar image

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:

  1. Update your system packages:

apt update sudo apt upgrade

  1. Install the required dependencies:

apt install python3-dev build-essential libgtk-3-dev libjpeg-dev libtiff-dev libaudio-dev libpng-dev libavcodec-dev

  1. Download the latest wxPython source package from the official website:

~/Downloads wget https://files.pythonhosted.org/packages/4a/4d/be94ee64f02ba7b64285c62af42b7782d2d53da5aafa107c781cc4893d5f/wxPython-4.1.1.tar.gz

  1. Extract the package and change to the wxPython directory:

-xvf wxPython-4.1.1.tar.gz cd wxPython-4.1.1

  1. Install the dependencies for the wxPython build:

apt install python3-setuptools python3-wheel python3-pip python3-sphinx python3-wxgtk4.0-dev pip3 install --user -r requirements.txt

  1. Build and install wxPython:

build.py build_ext --gtk3 --jobs=2 sudo python3 setup.py install

  1. Verify that wxPython is working correctly:

-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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-01-16 11:00:00 +0000

Seen: 9 times

Last updated: Mar 27 '22