Hi ,
I have installed a Python 2.6.3 Framework build from python.org and a
wx-python 2.8.10 unicode binary build from the wxpython website.
I also installed py2app from subversion with all the dependent
modules. I know the 2.8.10 wxpython works well and I can even run the
demos downloaded separately
I can build an app using a simple setup.py. The app however does not
launch on my machine and instead reports the following error
"ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/-lib-dynload/wx/_core_.so'
not found
On the same machine I also have the Apple supplied python 2.5 and
wxpython ('2.8.4.0')
When I build that python and py2app . I dont get this error.
So my question is
1) How do I get the _core_.so . DO I have to manually build wxpython
2) Could it be a simple error in my setup.py for py2app that is
creating this problem. If so I can email the pythonmac-sig list
instead. I am attaching the setup.py below.
I switched to a Framework build of python and wx because I wanted to
create standalone binaries for my wxpython app which will run on intel
and power-pc , OSX leopard and tiger.
Thanks for your help in advance
Hari Jayaram
···
###########################
setup.py that creates the *.app:
#########################
"""
This is a setup.py script generated by py2applet
Hi ,
I have installed a Python 2.6.3 Framework build from python.org and a
wx-python 2.8.10 unicode binary build from the wxpython website.
I also installed py2app from subversion with all the dependent
modules. I know the 2.8.10 wxpython works well and I can even run the
demos downloaded separately
I can build an app using a simple setup.py. The app however does not
launch on my machine and instead reports the following error
"ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/-lib-dynload/wx/_core_.so'
not found
On the same machine I also have the Apple supplied python 2.5 and
wxpython ('2.8.4.0')
When I build that python and py2app . I dont get this error.
So my question is
1) How do I get the _core_.so . DO I have to manually build wxpython
You should already have it, but in a different location than reported above. If you're able to run a wxPython app from the command line then you have _core_.so already installed. For example:
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx._core_
<module 'wx._core_' from '/usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so'>
>>>
2) Could it be a simple error in my setup.py for py2app that is
creating this problem. If so I can email the pythonmac-sig list
instead. I am attaching the setup.py below.
Yes, something is going wrong with py2app. It should have copied the _core_.so into your app bundle and when the embedded Python is run it should be loading it from that location. Make a closer examination of the output when py2app is running to see if there are any warnings or errors related to this that you should take care of, and also look at the contents of the app bundle to see what it is or isn't being copied there.
Hello Robin and everyone,
I have been emailing the pythonmac-sig group to figure out why py2app
is not putting a full python with the app bundle , but instead
creating a symlink to the System python inside
App/Contents/MacOS
for eg
lrwxr-xr-x 1 hari harijay 92 Oct 8 21:48 python ->
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
No matter which python I try , python 2.5.5 or python 2.6.3 from
python.org and the latest subversion build of py2app (0.4.2) , the
app bundle does not seem to contain a standalone python
I always get the app bundle sym-linking to system python and then
complaining about the absence of a _core_.so when I try to launch it.
Hari
harijaymac:dist hari$ cd GridZilla.app/Contents/MacOS/
harijaymac:MacOS hari$ ls -ltr
total 208
lrwxr-xr-x 1 hari harijay 92 Oct 8 21:48 python ->
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
-rwxr-xr-x 1 hari harijay 100276 Oct 8 21:48 GridZilla
···
On Thu, Oct 8, 2009 at 2:57 PM, Robin Dunn <robin@alldunn.com> wrote:
On 10/6/09 8:17 AM, hari jayaram wrote:
Hi ,
I have installed a Python 2.6.3 Framework build from python.org and a
wx-python 2.8.10 unicode binary build from the wxpython website.
I also installed py2app from subversion with all the dependent
modules. I know the 2.8.10 wxpython works well and I can even run the
demos downloaded separately
I can build an app using a simple setup.py. The app however does not
launch on my machine and instead reports the following error
"ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/-lib-dynload/wx/_core_.so'
not found
On the same machine I also have the Apple supplied python 2.5 and
wxpython ('2.8.4.0')
When I build that python and py2app . I dont get this error.
So my question is
1) How do I get the _core_.so . DO I have to manually build wxpython
You should already have it, but in a different location than reported
above. If you're able to run a wxPython app from the command line then
you have _core_.so already installed. For example:
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx._core_
<module 'wx._core_' from
'/usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so'>
>>>
2) Could it be a simple error in my setup.py for py2app that is
creating this problem. If so I can email the pythonmac-sig list
instead. I am attaching the setup.py below.
Yes, something is going wrong with py2app. It should have copied the
_core_.so into your app bundle and when the embedded Python is run it
should be loading it from that location. Make a closer examination of
the output when py2app is running to see if there are any warnings or
errors related to this that you should take care of, and also look at
the contents of the app bundle to see what it is or isn't being copied
there.