11 Replies - 2666 Views - Last Post: 26 September 2011 - 03:56 PM Rate Topic: -----

#1 iJasonTATE  Icon User is offline

  • New D.I.C Head

Reputation: -10
  • View blog
  • Posts: 41
  • Joined: 14-August 11

WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 06:55 AM

Whenever I try to run my simple menu program I get an error! I just startyed getting this error after I upgraded to 64bit windows 7 ultimate. I'm going to try a downgrade to 32bit but before I do I want to see if anyone can help.

import wx

class Example(wx.Frame):
    
    def __init__(self, *args, **kwargs):
        super(Example, self).__init__(*args, **kwargs) 
            
        self.InitUI()
        
    def InitUI(self):    

        menubar = wx.MenuBar()
        fileMenu = wx.Menu()
        fitem = fileMenu.Append(wx.ID_EXIT, 'Quit', 'Quit application')
        menubar.Append(fileMenu, '&File')
        self.SetMenuBar(menubar)
        
        self.Bind(wx.EVT_MENU, self.OnQuit, fitem)

        self.SetSize((300, 200))
        self.SetTitle('Simple menu')
        self.Centre()
        self.Show(True)
        
    def OnQuit(self, e):
        self.Close()

def main():
    
    ex = wx.App()
    Example(None)
    ex.MainLoop()    


if __name__ == '__main__':
    main()

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: WxPython not working (32 bit version on 64 bit windows)

#2 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 07:01 AM

First of all, "HELP!" is not a good name for a topic. We know you need help. That's what you're here. Using a descriptive title that gives us an idea of what your problem is will get you help more quickly.

Also, it's pretty obvious what the problem is. Did you read the error message? The problem is on line 1 and occurs when you try to import wx. Since you said this only started happening when you upgraded to Windows 7 64 bit (I'm assuming you had Windows 7 32 bit previously), my first guess would be to install the 64-bit version of WxPython. Give that a try and see if it fixes the problem.
Was This Post Helpful? 1
  • +
  • -

#3 iJasonTATE  Icon User is offline

  • New D.I.C Head

Reputation: -10
  • View blog
  • Posts: 41
  • Joined: 14-August 11

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 07:11 AM

View PostBrewer, on 26 September 2011 - 02:01 PM, said:

First of all, "HELP!" is not a good name for a topic. We know you need help. That's what you're here. Using a descriptive title that gives us an idea of what your problem is will get you help more quickly.

Also, it's pretty obvious what the problem is. Did you read the error message? The problem is on line 1 and occurs when you try to import wx. Since you said this only started happening when you upgraded to Windows 7 64 bit (I'm assuming you had Windows 7 32 bit previously), my first guess would be to install the 64-bit version of WxPython. Give that a try and see if it fixes the problem.


Didnt work.
Was This Post Helpful? -1
  • +
  • -

#4 Brewer  Icon User is offline

  • Awesome
  • member icon

Reputation: 179
  • View blog
  • Posts: 1,044
  • Joined: 14-June 10

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 07:19 AM

Personally, my best suggestion would be to switch to Linux, but a lot of people seem to get turned off when I suggest that. I have class in a few minutes, but I'll have another look when I'm done if no one else comes up with an answer.

In the meantime, try Googling and see what you can find.

This post has been edited by Brewer: 26 September 2011 - 07:19 AM

Was This Post Helpful? 0
  • +
  • -

#5 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 08:28 AM

"Switch to Linux" is really terrible advice. I had to hold myself back from down repping that one to be totally honest. I just keep telling myself "Good intentions, bad advice". Do you think that in an office environment, you'll be able to switch to Linux if that's what you want? Sometimes yes, sometimes no. Many employers want consistency among their developer's machines. If you're in a computer lab, choosing your OS typically is not a valid option either. This is like treating an ingrown toe nail with amputation of the foot. Most programmers have a fanatical love for Linux, but the truth is, it doesn't matter what OS you use. Linux was fun in college, until I realized how nice it was to have a machine that could run 90% of the software out there. It has its merits, I won't deny that, but there's no reason to put it on a pedestal.

Moving forward:

You should have downloaded and installed "64-bit Python 2.7". If it's still not working, could you give us an updated error?

This post has been edited by atraub: 26 September 2011 - 12:20 PM

Was This Post Helpful? 2
  • +
  • -

#6 iJasonTATE  Icon User is offline

  • New D.I.C Head

Reputation: -10
  • View blog
  • Posts: 41
  • Joined: 14-August 11

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 12:02 PM

View PostBrewer, on 26 September 2011 - 02:19 PM, said:

Personally, my best suggestion would be to switch to Linux, but a lot of people seem to get turned off when I suggest that. I have class in a few minutes, but I'll have another look when I'm done if no one else comes up with an answer.

In the meantime, try Googling and see what you can find.


Okay, I'll go home and get my Linux disc and quit what I'm doing and install it. Thanks!

View Postatraub, on 26 September 2011 - 03:28 PM, said:

"Switch to Linux" is really terrible advice. I had to hold myself back from down repping that one to be totally honest. I just keep telling myself "Good intentions, bad advice". Do you think that in an office environment, you'll be able to switch to Linux if that's what you want? Sometimes yes, sometimes no. Many employers want consistency among their developer's machines. If you're in a computer lab, choosing your OS typically is not a valid option either. This is like treating an ingrown toe nail with amputation of the foot. Most programmers have a fanatical love for Linux, but the truth is, it doesn't matter what OS you use. Linux was fun in college, until I realized how nice it was to have a machine that could run 90% of the software out there. It has its merits, I won't deny that, but there's no reason to put it on pedestal.

Moving forward:

You should have downloaded and installed "64-bit Python 2.7". If it's still not working, could you give us an updated error?

Thankyou soooooooooo much! I have the 64bit version, but there was an error when install. So I re-installed it and am good to go. Thanks again.
Was This Post Helpful? 0
  • +
  • -

#7 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 12:18 PM

So it's working properly... but you're going to reformat your system for Linux regardless? Or was that sarcasm?

This post has been edited by atraub: 26 September 2011 - 12:19 PM

Was This Post Helpful? 0
  • +
  • -

#8 iJasonTATE  Icon User is offline

  • New D.I.C Head

Reputation: -10
  • View blog
  • Posts: 41
  • Joined: 14-August 11

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 12:38 PM

Sarcasm.
Was This Post Helpful? 0
  • +
  • -

#9 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 12:46 PM

Let me explain something to you.

Brewer is an established member of this community and he was going out of his way to help you. We don't get paid for what we do, we just do it... each of us has our own reasons. I may disagree with him from time to time, I might even give him a friendly jab in the ribs, but I do respect him. If you showed a bit more respect to everyone here your rating might actually be positive again one day.

Brewer actively contributes and has even taught me a thing or two; what do you do, iJasonTATE?

This post has been edited by atraub: 26 September 2011 - 12:49 PM

Was This Post Helpful? 0
  • +
  • -

#10 iJasonTATE  Icon User is offline

  • New D.I.C Head

Reputation: -10
  • View blog
  • Posts: 41
  • Joined: 14-August 11

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 01:55 PM

View Postatraub, on 26 September 2011 - 07:46 PM, said:

Let me explain something to you.

Brewer is an established member of this community and he was going out of his way to help you. We don't get paid for what we do, we just do it... each of us has our own reasons. I may disagree with him from time to time, I might even give him a friendly jab in the ribs, but I do respect him. If you showed a bit more respect to everyone here your rating might actually be positive again one day.

Brewer actively contributes and has even taught me a thing or two; what do you do, iJasonTATE?


What I do is post my questions when I have them. I could care less about my rating:) What do you do?
Was This Post Helpful? 0
  • +
  • -

#11 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 03:03 PM

I'm a senior python engineer for a marketing company ;)
Was This Post Helpful? 0
  • +
  • -

#12 iJasonTATE  Icon User is offline

  • New D.I.C Head

Reputation: -10
  • View blog
  • Posts: 41
  • Joined: 14-August 11

Re: WxPython not working (32 bit version on 64 bit windows)

Posted 26 September 2011 - 03:56 PM

That's very cool!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1