Installing wxPython in Ubuntu 12.10

2024/10/15 17:21:58

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 wxclass naman(wx.Frame):def __init__(self,parent,id):  # @ReservedAssignmentwx.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.

Answer

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:

  • http://wxpython.org/Phoenix/snapshot-builds/

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.

https://en.xdnf.cn/q/117806.html

Related Q&A

Open a file name +date as csv in Python [closed]

Its difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying thi…

TextCtrl providing an out of bound exception in wxPython

I am new to WX, so I decided to make a program that will periodically write out a line of text to the screen based on an outside input. The basis of the program contains a basic window with the multili…

Matplotlib: different color for every point of line plot

Im trying to make a plot like in the following figure (source of image): Im talking about the plot in the right panel even though there is some correlation between the two panels: the colorbar. Just s…

getting template syntax error in django template

my code in view :tracks = client.get(/tracks, order=hotness, limit=4) artwork_url=[] for track in tracks:artwork_url.append(str(track.artwork_url).replace("large", "t300x300")) …

Python threading:Is it okay to read/write multiple mutually exclusive parts of a file concurrently?

I know we can guarantee correctness either by locking or using a specialized thread whose sole job is to read/write and communicate with it through queue. But this approach seems logically ok, so I wan…

Theano Cost Function, TypeError: Unknown parameter type: class numpy.ndarray

Im new to Theano, just learning it. I have a ANN in python that Im implementing in Theano as learning process. Im using Spyder.And Theano throws out an error: TypeError: Unknown parameter type: class n…

Bar plotting grouped Pandas

I have a question regarding plotting grouped DataFrame data.The data looks like:data =index taste food0 good cheese 1 bad tomato 2 worse tomato 3 worse …

Nginx+bottle+uwsgi Server returning 404 on every request

I have setup an Nginx server with following configuration:server {listen 8080;server_name localhost;location / {include uwsgi_params;uwsgi_pass unix:/tmp/uwsgi.notesapi.socket;uwsgi_param UWSGI_PYHOME …

Checking multiple for items in a for loop python

Ive written a code to tell the user that the their brackets are not balanced.I can exactly tell where my code is going wrong.Once it comes across the first situation of brackets, it does not continue t…

Can I export pandas DataFrame to Excel stripping tzinfo?

I have a timezone aware TimeSeries in pandas 0.10.1. I want to export to Excel, but the timezone prevents the date from being recognized as a date in Excel.In [40]: resultado Out[40]: fecha_hora 2013-…