Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python ImportError: No module named wx

Im sorry to ask this question again. I have searched and found endles repeats of it both on stackoverflow and also on general google search. Unfortunatly I just cant get my system sorted.

I have the following:

C:\Python27\Lib\site-packages\wx-2.8-msw-unicode 

this folder contains the wx folder and also wx & wxPython folders which each contain the _init_.py files

When I import wx I get the error message "no module named wx"

What do I need to do in order to get Python to find the relevant files to allow me to "import wx" succesfully

like image 393
Luke Bream Avatar asked Dec 22 '11 21:12

Luke Bream


People also ask

What is WX module in Python?

Python provides wxpython module which allows us to create high functional graphical user interface. It is an Open Source module, which means it is free for anyone to use and the source code is available for anyone to look and modify.

Does wxPython work with python3?

The wxPython 4 package is compatible with both Python 2.7 and Python 3. Note: On Mac OS X you will need a compiler installed such as XCode for the install to complete successfully. Linux may also require you to install some dependencies before the pip installer will work correctly.

What is the use of wxPython?

wxPython is a wrapper for the cross-platform GUI API (often referred to as a "toolkit") wxWidgets (which is written in C++) for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extension module (native code).


1 Answers

Ubuntu:

sudo apt-get install python-wxtools 
like image 155
Giuseppe Urso Avatar answered Sep 23 '22 06:09

Giuseppe Urso