0

I am trying to install wxPython on my Ubuntu 12.10 but with no success. I have gone through all the answers given on this website. Can someone please help me in this or point me in the right direction.

Initially, I tried http://wxpython.org/BUILD.html but then I came to know that it is in the repository, I ran "sudo apt-get install install python-wxgtk2.8", it installed without any error but then, when I run it, it is still unavailable. I guess I am doing something in the running step.

Also, although it is working in Eclipse using PyDev, but I am getting this warning " LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent."" after I close the application and the status bar is also not working,

Here is my code:

import wx

class naman(wx.Frame):
    def __init__(self,parent,id):  # @ReservedAssignment
        wx.Frame.__init__(self,parent,id,'Frame aka Window', size=(300,200))
        panel=wx.Panel(self)

        statusbar=self.CreateStatusBar()
        menubar=wx.MenuBar()
        first=wx.Menu()
        second=wx.Menu()
        first.Append(wx.NewId(),"New Window", "This opens a new window")
        first.Append(wx.NewId(),"Open...", "This will open")
        second.Append(wx.NewId(),"Undo", "This will undo")
        second.Append(wx.NewId(),"Redo", "This will redo")
        menubar.Append(first,"File")
        menubar.Append(second,"Edit")
        self.SetMenuBar(menubar)
    if __name__=='__main__':
    app=wx.PySimpleApp()
    frame=naman(parent=None,id=-1)
    frame.Show()
    app.MainLoop()

If someone can tell why I am getting this warning and why status bar is not working, that would be great too!! Then, I can continue working in eclipse itself and don't bother about wxPython.

PS: I have Python2.7 and Python3.3 already installed.

Thanks in advance.

3
  • 2
    What answers did you try and how exactly didn't it work? Please add more detail to your question. Commented Jun 23, 2013 at 15:07
  • Are you using the correct version of Python? As I understand it, wxPython does not yet support Python 3. Commented Jun 23, 2013 at 16:09
  • wxPython's Phoenix project is compatible with Python 3, but it's not complete yet. There's still a lot of widgets to port. Commented Jun 24, 2013 at 14:36

1 Answer 1

2

You need to install wxPython Phoenix, not 2.8. The 2.8 series and the 2.9 Classic series are only Python 2.x compatible. You'll have to grab a Phoenix snapshot to build against as it is the only version that is Python 3 compatible. You can get one here:

Note that Phoenix is very beta in that it only supports the core widgets currently. Most of the custom widgets, like those in wx.lib, are still being ported. See http://wiki.wxpython.org/ProjectPhoenix for more information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.