Hi,
I tried to compile new wxPython from source, but didn't succeed. I use Debian and when I am lazy and can't get debian package I convert rpm to deb and install it. Usually it works fine. Now it's not the case. When I start python in console and try to import wx I get this:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/wx/__init__.py", line 19, in ?
from wx.core import *
File "/usr/lib/python2.3/site-packages/wx/core.py", line 4, in ?
import _core
ImportError: /usr/lib/python2.3/site-packages/wx/_core.so: undefined symbol: PyUnicodeUCS2_AsWideChar
Can I fix it some how? What does it mean anyway? When I try to run this:
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, -1, title)
p = wx.Panel(self, -1)
b = wx.Button(p, -1, "Do It", (10,10))
self.Bind(wx.EVT_BUTTON, self.JustDoIt, b)
def JustDoIt(self, evt):
print "It's done!"
app = wx.PySimpleApp()
f = MyFrame(None, "What's up?")
f.Show()
app.MainLoop()
It says that module has no attribute Frame. Thanks for help.
Petr
Hi,
I tried to compile new wxPython from source, but didn't succeed. I use Debian and when I am lazy and can't get debian package I convert rpm to deb and install it. Usually it works fine. Now it's not the case. When I start python in console and try to import wx I get this:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/wx/__init__.py", line 19, in ?
from wx.core import *
File "/usr/lib/python2.3/site-packages/wx/core.py", line 4, in ?
import _core
ImportError: /usr/lib/python2.3/site-packages/wx/_core.so: undefined symbol: PyUnicodeUCS2_AsWideChar
Can I fix it some how? What does it mean anyway?
Because the Python on your system was built with different Unicode
options than the Python on the machine I built wxPython on, so they are
not binary compatible.
You will need to compile wxPython on your machine yourself, or wait for
the 2.5 debs.
When I try to run this:
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, -1, title)
p = wx.Panel(self, -1)
b = wx.Button(p, -1, "Do It", (10,10))
self.Bind(wx.EVT_BUTTON, self.JustDoIt, b)
def JustDoIt(self, evt):
print "It's done!"
app = wx.PySimpleApp()
f = MyFrame(None, "What's up?")
f.Show()
app.MainLoop()
It says that module has no attribute Frame.
Because the wx modules did not fully load.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!