5
votes

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?

2
wxpython isn't part of the standard python library, the only standard gui library is tkinter. Project phoenix: wiki.wxpython.org/ProjectPhoenix. is wxPython which is compatible with python 3, I don't know how finished a product they have though so it may not be useable yet. - NDevox
Thanks @Scironic. I came across that earlier and hit a wall because I am ALSO having problems with pip and can't install wheel packages (or any packages for that matter--something is really screwy with my pip). - Charlie
Windows and pip are notoriously bad together, you can download windows binaries from here if you need: lfd.uci.edu/~gohlke/pythonlibs - NDevox
That's where I've been getting most of my packages from since pip hasn't been working, but now I'm hitting a point where I need pip because I can't find binaries of certain packages, only wheels. - Charlie

2 Answers

6
votes

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:

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:

1
votes
  • 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