Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wxPython in Python 3.4.1

I'm relatively new to Python programming, so apologies in advance if this question seems stupid. I'm trying to download a new Python editor (drpython) that is written with wxpython. I have Python 3.4.1 64-bit on a Windows 8.1 machine.

I was under the impression that wxpython was bundled into the standard library in Python 3, yet whenever I try to use applications that utilize it I get a 'can't import' error. On the wxpython website, it seems they only have downloads for Python 2.

Is wxpython not supported on Python 3.4? Has anyone else had trouble using wxpython with Python 3.4?

like image 797
Charlie Avatar asked Jan 19 '15 16:01

Charlie


2 Answers

wxPython is not part of Python. You may be thinking of Tkinter, a UI toolkit that is included with Python. Currently, wxPython is only supported on Python 3 via the Phoenix project. At the time of this writing, Project Phoenix has the core wxPython widgets ported, but much of the 3rd party widgets are not.

As already mentioned, you can read about Phoenix here:

  • http://wiki.wxpython.org/ProjectPhoenix

You need the latest version of pip to install a wheel. Make sure you have the latest. Once you do, you can do something like this to install wxPython Phoenix:

pip install -U --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix 

See also:

  • https://groups.google.com/forum/#!searchin/wxpython-dev/pip$20install/wxpython-dev/LmGIrQyh7jc/_qe3FiVJv1MJ
like image 104
Mike Driscoll Avatar answered Oct 20 '22 10:10

Mike Driscoll


  • Before python3 - wxPython.
  • From python3 onwards - wxPython_Phoenix. (new version of wxPython)
  • When wxPython is used on Python3 it gives import errors. Command given by Mike Driscoll in answer above works but small update is with https.

    pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix

like image 24
asr9 Avatar answered Oct 20 '22 08:10

asr9