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'
#23
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 https://python-forum.io/Thread-Part-1-Li...3#pid18603 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.
tom@tom:~$ python -V
Python 3.8.1

# Go Back to 3.7,easy with pyenv
tom@tom:~$ pyenv global 3.7.3
tom@tom:~$ 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 https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.2-cp37-cp37m-linux_x86_64.whl

# Test that it work
tom@tom:~$ 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__
'4.0.2'
>>> exit()
Reply


Messages In This Thread
Linux: No module named 'wx' - by PeterLinux - Mar-30-2020, 05:03 AM
RE: Linux: No module named 'wx' - by Larz60+ - Mar-30-2020, 10:24 AM
RE: Linux: No module named 'wx' - by PeterLinux - Mar-30-2020, 10:56 AM
RE: Linux: No module named 'wx' - by PeterLinux - Mar-30-2020, 12:29 PM
RE: Linux: No module named 'wx' - by joe_momma - Mar-30-2020, 11:43 PM
RE: Linux: No module named 'wx' - by buran - Mar-31-2020, 04:11 AM
RE: Linux: No module named 'wx' - by PeterLinux - Mar-31-2020, 10:56 AM
RE: Linux: No module named 'wx' - by buran - Mar-31-2020, 11:07 AM
RE: Linux: No module named 'wx' - by PeterLinux - Mar-31-2020, 11:36 AM
RE: Linux: No module named 'wx' - by buran - Mar-31-2020, 11:52 AM
RE: Linux: No module named 'wx' - by Larz60+ - Apr-01-2020, 04:39 PM
RE: Linux: No module named 'wx' - by PeterLinux - Apr-01-2020, 05:18 PM
RE: Linux: No module named 'wx' - by Larz60+ - Apr-02-2020, 01:48 AM
RE: Linux: No module named 'wx' - by PeterLinux - Apr-02-2020, 02:12 AM
RE: Linux: No module named 'wx' - by joe_momma - Apr-02-2020, 03:46 AM
RE: Linux: No module named 'wx' - by PeterLinux - Apr-02-2020, 04:55 AM
RE: Linux: No module named 'wx' - by buran - Apr-02-2020, 05:01 AM
RE: Linux: No module named 'wx' - by Larz60+ - Apr-02-2020, 06:22 AM
RE: Linux: No module named 'wx' - by buran - Apr-02-2020, 06:31 AM
RE: Linux: No module named 'wx' - by PeterLinux - Apr-02-2020, 09:41 AM
RE: Linux: No module named 'wx' - by buran - Apr-02-2020, 10:55 AM
RE: Linux: No module named 'wx' - by PeterLinux - Apr-02-2020, 12:04 PM
RE: Linux: No module named 'wx' - by snippsat - Apr-02-2020, 12:07 PM
RE: Linux: No module named 'wx' - by PeterLinux - Apr-02-2020, 12:50 PM

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

Forum Jump:

User Panel Messages

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