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'
#21
instead of using python 3, just use python 3.7

or look at https://python-forum.io/Thread-Part-1-Li...3#pid18603 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

Reply
#22
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.

Greetings
Peter
Reply
#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
#24
Thanks again to everybody. I view this as solved.

Peter
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] ModuleNotFoundError: No module named 'PyQt5' matklt 2 16,588 Jun-02-2020, 07:05 AM
Last Post: Knight18
  [Kivy] ModuleNotFoundError: No module named 'kivy' Exsul 7 30,053 Mar-30-2019, 12:58 AM
Last Post: Exsul
  "ModuleNotFoundError: No module named '_tkinter' in Python 3.8 Alfa 0 programmerc 1 6,285 Oct-21-2018, 06:32 PM
Last Post: Larz60+
  PyGtk3, No Module Named gi, on python3.5 on Windows harun2525 8 34,326 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