Python Forum
[WxPython] Linux: No module named 'wx'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] Linux: No module named 'wx'
instead of using python 3, just use python 3.7

or look at for using pyenv for version management
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

It all doesn't work. I tried it. It's a bottomless pit.

I will use Python2 and tryout Fedora as soon as I get my ordered DVD-Rs.

Thanks for the help and the patience.
I view this as solved.

PeterLinux Wrote:Next I tried:
Quote:sudo apt remove python3
Still 3.8.2
How do I get rid of 3.8.2 without doing something like "ln -s ..."?
You most never do this,if it now have removed the default python 3.6 that comes per-installed Ubuntu 18.
It can mess dependencies that Linux use from this default version.

If have compile yourself to 3.7,then can set alias to that version in ~/.bashrc.
alias python3=/usr/local/bin/python3.7

Buran Wrote:or look at for using pyenv for version management
That's link to my older setup for pyenv.
Here is the new Thread pyenv Simple Python Version Management
So here a demo setting up WxPython when using pyenv.
[email protected]:~$ python -V
Python 3.8.1

# Go Back to 3.7,easy with pyenv
[email protected]:~$ pyenv global 3.7.3
[email protected]:~$ python -V
Python 3.7.3

# Install the one dependency that pyenv need to run wxpython
sudo apt-get update
sudo apt-get install libpython3.7-dev

# Install WxPython
pip install

# Test that it work
[email protected]:~$ python
Python 3.7.3 (default, Apr 17 2019, 11:23:54) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.__version__
>>> exit()
Thanks again to everybody. I view this as solved.


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] ModuleNotFoundError: No module named 'PyQt5' matklt 2 3,689 Jun-02-2020, 07:05 AM
Last Post: Knight18
  [Kivy] ModuleNotFoundError: No module named 'kivy' Exsul 7 16,521 Mar-30-2019, 12:58 AM
Last Post: Exsul
  "ModuleNotFoundError: No module named '_tkinter' in Python 3.8 Alfa 0 programmerc 1 3,384 Oct-21-2018, 06:32 PM
Last Post: Larz60+
  PyGtk3, No Module Named gi, on python3.5 on Windows harun2525 8 25,805 May-19-2017, 01:30 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020