I have tried installing it using apt-get:
sudo apt-get install python-wxgtk3.0
But still when I run a py script with import wx it throws an error 'no module named wx' on Python 2.x and Python 3.x
I also tried installing it using pip:
pip install wxpython
which gives me an error saying failed building wheel for wxpython.
I also tried building wxpython from
source.
but it shows a network error whenever I try to download the tar.gz file. I have unsuccesfully tried downloading it from multiple networks.
Please help.
Best Answer
In Ubuntu 16.04 and later open the terminal and type:
Then check if wx works in Python 2.x as follows:
Example code
wxPython-window.py
cd
to the parent directory of wxPython-window.py./wxPython-window.py