[Pythonmac-SIG] Import Error / Library Version

Ken Mankoff mankoff at gmail.com
Sun Oct 12 00:18:35 CEST 2008


On Thu, 9 Oct 2008, Ken Mankoff wrote:

> Hi PythonMac-SIG,
>
> I posted this on the wxpython-mac list (sorry for dupe) but was 
> not able to solve the issue, so I'm trying here.
>
> I've succeeded in getting a python script running on 10.5 intel 
> and then transferred and running on 10.4 ppc via py2app thanks to 
> a recent thread in this group. I've now run into what appears to 
> be a wx specific problem.
>
> When I double-click on a small Hello World wxPython app, I get the 
> following error message:
>
>> Hello Error. An unexpected error occurred during the execution of 
>> the main script
>> 
>> ImportError: 
>> dlopen(/Users/mankoff/Desktop/Hello.app/Contents/Resources/lib/python2.5/wx/_core_.so, 
>> 2): Library not loaded /usr/lib/libiconv.2.dylib
>> 
>> Referenced from 
>> /Users/mankoff/Desktop/Hello.app/Contents/MacOS/../Frameworks/libwx_macud-2.8.2.dylib
>> 
>> Reason: Incompatible library version: libwx_macud-2.8.0.dylib 
>> requires version 7.0.0 or later, but libiconv.2.dylib provides 
>> version 5.0.0
>
> I created the app with:
>
> python setup.py py2app
>
> Where 'which python' shows it is my python.org build installed in 
> /opt/python/2.5.2/.
>
>
> The setup.py script is:
> [code]
> from distutils.core import setup 
> import py2app
> py2app_options = dict( )
> setup(
>    app=['hello.py'],
>    options=dict(
> 	py2app=py2app_options,
>    )
> )
>[/code]
>
> And the hello.py code is:
> [code]
> import wx
> app = wx.PySimpleApp()
> frame = wx.Frame(None, wx.ID_ANY, "Hello World")
> frame.Show(True)
> app.MainLoop()
> [/code]
>
> Any help will be much appreciated.
>
> Thanks,
>
>   -k.
>

I just discovered this is a wxWidgets bug, not wxPython. I'll track 
it down there.

    -k.




More information about the Pythonmac-SIG mailing list