From kw at codebykevin.com Thu Nov 1 02:11:15 2012 From: kw at codebykevin.com (Kevin Walzer) Date: Wed, 31 Oct 2012 21:11:15 -0400 Subject: [Pythonmac-SIG] Getting control over the Apple menu In-Reply-To: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> Message-ID: <5091CC33.9090601@codebykevin.com> On 10/31/12 5:48 PM, wrw at mac.com wrote: > applemenu = Menu(menubar, tearoff = FALSE) Add the apple name to the menu object, cf: applemenu = Menu(menubar, tearoff = FALSE, name='apple') That works for me. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From wrw at mac.com Thu Nov 1 02:49:37 2012 From: wrw at mac.com (wrw at mac.com) Date: Wed, 31 Oct 2012 21:49:37 -0400 Subject: [Pythonmac-SIG] Getting control over the Apple menu In-Reply-To: <5091CC33.9090601@codebykevin.com> References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> Message-ID: On Oct 31, 2012, at 9:11 PM, Kevin Walzer wrote: > On 10/31/12 5:48 PM, wrw at mac.com wrote: >> applemenu = Menu(menubar, tearoff = FALSE) > > Add the apple name to the menu object, cf: > > applemenu = Menu(menubar, tearoff = FALSE, name='apple') > > That works for me. > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com Thanks, that DOES work for the version packaged up with py2app. I guess there really just isn't anything to do for it when it is running directly in the interpreter. Where should I have been looking to find that for myself, please? Thanks again, -Bill From nad at acm.org Thu Nov 1 05:17:07 2012 From: nad at acm.org (Ned Deily) Date: Wed, 31 Oct 2012 21:17:07 -0700 Subject: [Pythonmac-SIG] Getting control over the Apple menu References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> Message-ID: In article , wrw at mac.com wrote: > On Oct 31, 2012, at 9:11 PM, Kevin Walzer wrote: > > On 10/31/12 5:48 PM, wrw at mac.com wrote: > >> applemenu = Menu(menubar, tearoff = FALSE) > > > > Add the apple name to the menu object, cf: > > > > applemenu = Menu(menubar, tearoff = FALSE, name='apple') > > > > That works for me. > Thanks, that DOES work for the version packaged up with py2app. I guess > there really just isn't anything to do for it when it is running directly in > the interpreter. It works for me. Py2app should have nothing to do with tkinter menus other than possibly the application name. The code should work equally well in the interpreter or with a py2app-bundled app. Are you sure you are invoking the right interpreter if you are depending on the shebang line? -- Ned Deily, nad at acm.org From kw at codebykevin.com Thu Nov 1 14:21:54 2012 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 01 Nov 2012 09:21:54 -0400 Subject: [Pythonmac-SIG] Getting control over the Apple menu In-Reply-To: References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> Message-ID: <50927772.4070203@codebykevin.com> On 10/31/12 9:49 PM, wrw at mac.com wrote: > Where should I have been looking to find that for myself, please? The Tk man pages discuss special menus, including the Apple menu; I figured it out in Tkinter by Googling for snippets. Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From wrw at mac.com Thu Nov 1 14:37:36 2012 From: wrw at mac.com (wrw at mac.com) Date: Thu, 01 Nov 2012 09:37:36 -0400 Subject: [Pythonmac-SIG] Getting control over the Apple menu In-Reply-To: References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> Message-ID: <3E5BD281-D940-44AB-B2D3-4617AB5038F4@mac.com> On Nov 1, 2012, at 12:17 AM, Ned Deily wrote: > In article , wrw at mac.com > wrote: >> On Oct 31, 2012, at 9:11 PM, Kevin Walzer wrote: >>> On 10/31/12 5:48 PM, wrw at mac.com wrote: >>>> applemenu = Menu(menubar, tearoff = FALSE) >>> >>> Add the apple name to the menu object, cf: >>> >>> applemenu = Menu(menubar, tearoff = FALSE, name='apple') >>> >>> That works for me. >> Thanks, that DOES work for the version packaged up with py2app. I guess >> there really just isn't anything to do for it when it is running directly in >> the interpreter. > > It works for me. Py2app should have nothing to do with tkinter menus > other than possibly the application name. The code should work equally > well in the interpreter or with a py2app-bundled app. Are you sure you > are invoking the right interpreter if you are depending on the shebang > line? > > -- > Ned Deily, Ned, Thanks for the comment - but I'm puzzled. Maybe I should have been more explicit or descriptive. When running the script directly in the interpreter, that is, when I invoke is as $ ./CM_GUI_2.py in a terminal window (or as $ python CM_GUI_2.py) the first menu to the right of the Apple icon (the one I'd call the Application menu) remains named "Python" - although the menu under it now includes the items I've created. When I invoke the bundled version that is the result of the py2app packaging, that menu gets named CM_GUI_2. I've tried this on both my development system (admittedly with lots of stuff downloaded from python.org) and on my laptop, which is almost stock. It remains true even if (on the laptop) I invoke the stock Apple python interpreter from /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python and then ">>> import CM_GUI_2.py" If it really is true that running the script in a terminal window changes that Application menu name on your system, I'd REALLY like to know how to accomplish that. Thanks, Bill From kw at codebykevin.com Thu Nov 1 15:43:21 2012 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 01 Nov 2012 10:43:21 -0400 Subject: [Pythonmac-SIG] Getting control over the Apple menu In-Reply-To: <3E5BD281-D940-44AB-B2D3-4617AB5038F4@mac.com> References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> <3E5BD281-D940-44AB-B2D3-4617AB5038F4@mac.com> Message-ID: <50928A89.9080400@codebykevin.com> On 11/1/12 9:37 AM, wrw at mac.com wrote: > When running the script directly in the interpreter, that is, when I invoke is as $ ./CM_GUI_2.py in a terminal window (or as $ python CM_GUI_2.py) the first menu to the right of the Apple icon (the one I'd call the Application menu) remains named "Python" - although the menu under it now includes the items I've created. That's expected behavior. The application name in the app menu corresponds to the actual executable that is running the app. When you run the app in Terminal, the executable is Python. When it's wrapped with py2app, the executable is the actual app name (actually, the stub executable created by py2app, but which is renamed to match your app). You shouldn't expect to see anything but what you are seeing. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From wrw at mac.com Thu Nov 1 16:11:36 2012 From: wrw at mac.com (wrw at mac.com) Date: Thu, 01 Nov 2012 11:11:36 -0400 Subject: [Pythonmac-SIG] Getting control over the Apple menu In-Reply-To: <50928A89.9080400@codebykevin.com> References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> <3E5BD281-D940-44AB-B2D3-4617AB5038F4@mac.com> <50928A89.9080400@codebykevin.com> Message-ID: <509308E1-ED1E-4CCB-8EFE-F672E2B97702@mac.com> On Nov 1, 2012, at 10:43 AM, Kevin Walzer wrote: > On 11/1/12 9:37 AM, wrw at mac.com wrote: >> When running the script directly in the interpreter, that is, when I invoke is as $ ./CM_GUI_2.py in a terminal window (or as $ python CM_GUI_2.py) the first menu to the right of the Apple icon (the one I'd call the Application menu) remains named "Python" - although the menu under it now includes the items I've created. > > That's expected behavior. The application name in the app menu corresponds to the actual executable that is running the app. When you run the app in Terminal, the executable is Python. When it's wrapped with py2app, the executable is the actual app name (actually, the stub executable created by py2app, but which is renamed to match your app). You shouldn't expect to see anything but what you are seeing. > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com Good - that's pretty much what I deduced after thinking about your answer last night. Then Ned's post made me scratch my head. Thanks, Bill From nad at acm.org Thu Nov 1 17:00:09 2012 From: nad at acm.org (Ned Deily) Date: Thu, 01 Nov 2012 09:00:09 -0700 Subject: [Pythonmac-SIG] Getting control over the Apple menu References: <9A15D3B0-BD98-40BF-9EB2-E58ECE673518@mac.com> <5091CC33.9090601@codebykevin.com> <3E5BD281-D940-44AB-B2D3-4617AB5038F4@mac.com> <50928A89.9080400@codebykevin.com> <509308E1-ED1E-4CCB-8EFE-F672E2B97702@mac.com> Message-ID: In article <509308E1-ED1E-4CCB-8EFE-F672E2B97702 at mac.com>, wrw at mac.com wrote: > On Nov 1, 2012, at 10:43 AM, Kevin Walzer wrote: > > On 11/1/12 9:37 AM, wrw at mac.com wrote: > >> When running the script directly in the interpreter, that is, when I > >> invoke is as $ ./CM_GUI_2.py in a terminal window (or as $ python > >> CM_GUI_2.py) the first menu to the right of the Apple icon (the one I'd > >> call the Application menu) remains named "Python" - although the menu > >> under it now includes the items I've created. > > > > That's expected behavior. The application name in the app menu corresponds > > to the actual executable that is running the app. When you run the app in > > Terminal, the executable is Python. When it's wrapped with py2app, the > > executable is the actual app name (actually, the stub executable created by > > py2app, but which is renamed to match your app). You shouldn't expect to > > see anything but what you are seeing. > Good - that's pretty much what I deduced after thinking about your answer > last night. Then Ned's post made me scratch my head. Sorry for the confusion. I interpreted your previous post to mean that using the 'apple' menu didn't behave the same in both cases, i.e. extra menu cascade. To expand on the app name a bit, the application name displayed in the menu comes from the Info.plist of the app bundle under which your Python script is running. With a standard framework build of Python, there is a Python.app bundle included in the Python framework so that OS X treats the execution as from a full-blown app and certain gui features work. That Python.app bundle has the name "Python" in the plist. py2app, of course, creates a custom app bundle including an Info.plist with the app name you specify. -- Ned Deily, nad at acm.org From calderon.christian760 at gmail.com Fri Nov 2 07:53:48 2012 From: calderon.christian760 at gmail.com (Christian Calderon) Date: Thu, 1 Nov 2012 23:53:48 -0700 Subject: [Pythonmac-SIG] building python from source as 64-bit universal on g5 powermac with gcc-4.2 Message-ID: <0F6ADBFE-6E72-4F03-9A18-1A976521734A@gmail.com> I have asked about this before, but back then I knew nothing about building anything from source. This time I have a little more experience, so maybe I can better describe what's going on? If I run ./configure with no options, it configures fine, and I can make and make install with only sqlite messing up (which I don't even care about). This is good, but the only reason I want to build from source is to have a 64-bit version of python that can use more of my ram for an image manipulation project I am working on. but when I try ./configure --enable-universalsdk --with-universal-archs=64-bit the configure fails when it is checking the size of different types. This also fails with 'all' or 3-way as the arch type This is the output right before the configure fails checking size of int... 0 checking size of long... 0 checking size of void *... 0 checking size of short... 0 checking size of float... 0 checking size of double... 0 checking size of fpos_t... 0 checking size of size_t... configure: error: in `/Users/Administrator/ Downloads/Python-2.7.3': configure: error: cannot compute sizeof (size_t) See `config.log' for more details I know that 64-bit python on powermacs isn't supported. I just want to know if anyone has seen this before and/or has any tips to point me towards a successful build. Please don't tell me "Get an Intel mac". that's not helpful :p Thanks! P.S. I tried with --enable-universalsdk=/ and It pretended to build and install fine, but when I tried arch -ppc64 python2.7, i got arch: posix_spawnp: python2.7: Bad CPU type in executable Again, does anyone know why this is? Is there a better directory for me to use for --enable-unversalsdk? And if I make gcc an alias for gcc-4.2 in my .bash_profile, does that change what make uses when it tries to use gcc? I have had problems with gcc before (it is version 4.0.1 on my computer) but gcc-4.2 has fixed my problems before. Any tips or ideas? Don't be afraid to be technical in answers, or to point me to references. Thanks again for any help! From pythonmac at rebertia.com Fri Nov 2 08:02:40 2012 From: pythonmac at rebertia.com (Chris Rebert) Date: Fri, 2 Nov 2012 00:02:40 -0700 Subject: [Pythonmac-SIG] building python from source as 64-bit universal on g5 powermac with gcc-4.2 In-Reply-To: <0F6ADBFE-6E72-4F03-9A18-1A976521734A@gmail.com> References: <0F6ADBFE-6E72-4F03-9A18-1A976521734A@gmail.com> Message-ID: On Thu, Nov 1, 2012 at 11:53 PM, Christian Calderon wrote: > I have asked about this before, but back then I knew nothing about building > anything from source. This time I have a little more experience, so maybe I > can better describe what's going on? > If I run ./configure with no options, it configures fine, and I can make and > make install with only sqlite messing up (which I don't even care about). > This is good, but the only reason I want to build from source is to have a > 64-bit version of python that can use more of my ram for an image > manipulation project I am working on. but when I try > ./configure --enable-universalsdk --with-universal-archs=64-bit > the configure fails when it is checking the size of different types. This > also fails with 'all' or 3-way as the arch type This is the output right > before the configure fails > > checking size of int... 0 > checking size of long... 0 > checking size of void *... 0 > checking size of short... 0 > checking size of float... 0 > checking size of double... 0 > checking size of fpos_t... 0 > checking size of size_t... configure: error: in > `/Users/Administrator/Downloads/Python-2.7.3': > configure: error: cannot compute sizeof (size_t) > See `config.log' for more details And what did config.log say? Cheers, Chris From ronaldoussoren at mac.com Fri Nov 2 10:26:18 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 02 Nov 2012 10:26:18 +0100 Subject: [Pythonmac-SIG] building python from source as 64-bit universal on g5 powermac with gcc-4.2 In-Reply-To: <0F6ADBFE-6E72-4F03-9A18-1A976521734A@gmail.com> References: <0F6ADBFE-6E72-4F03-9A18-1A976521734A@gmail.com> Message-ID: <12A8C5EE-F043-4FA4-97D3-893ED21EB71B@mac.com> On 2 Nov, 2012, at 7:53, Christian Calderon wrote: > I have asked about this before, but back then I knew nothing about building anything from source. This time I have a little more experience, so maybe I can better describe what's going on? > If I run ./configure with no options, it configures fine, and I can make and make install with only sqlite messing up (which I don't even care about). This is good, but the only reason I want to build from source is to have a 64-bit version of python that can use more of my ram for an image manipulation project I am working on. but when I try > ./configure --enable-universalsdk --with-universal-archs=64-bit > the configure fails when it is checking the size of different types. This also fails with 'all' or 3-way as the arch type This is the output right before the configure fails > > checking size of int... 0 > checking size of long... 0 > checking size of void *... 0 > checking size of short... 0 > checking size of float... 0 > checking size of double... 0 > checking size of fpos_t... 0 > checking size of size_t... configure: error: in `/Users/Administrator/Downloads/Python-2.7.3': > configure: error: cannot compute sizeof (size_t) > See `config.log' for more details This doesn't look right, the sizes of basic types are larger than 0 bytes. Does your compiler work, in particular: can gcc create x86_64 and ppc64 binaries on your machine? What's in config.log? In particular the error message around the lines about computing sizeof size_t. > > I know that 64-bit python on powermacs isn't supported. I just want to know if anyone has seen this before and/or has any tips to point me towards a successful build. Please don't tell me "Get an Intel mac". that's not helpful :p Thanks! 64-bit python on powermacs should work, but most (if not all) core devs do not have access to these machines. The only ppc machine I have is an old G4 imac and that can't run 64-bit code at all > > P.S. I tried with --enable-universalsdk=/ and It pretended to build and install fine, but when I tried arch -ppc64 python2.7, i got That' s expected, this defaults to 32-bit only executables (ppc and i386). > > arch: posix_spawnp: python2.7: Bad CPU type in executable > > Again, does anyone know why this is? Is there a better directory for me to use for --enable-unversalsdk? And if I make gcc an alias for gcc-4.2 in my .bash_profile, does that change what make uses when it tries to use gcc? I have had problems with gcc before (it is version 4.0.1 on my computer) but gcc-4.2 has fixed my problems before. Any tips or ideas? Don't be afraid to be technical in answers, or to point me to references. Thanks again for any help! If you only need PPC64 support you could try: ./configure CFLAGS="-O2 -arch ppc64" LDFLAGS="-arch pp64" Ronald > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From calderon.christian760 at gmail.com Tue Nov 13 08:53:32 2012 From: calderon.christian760 at gmail.com (Christian Calderon) Date: Mon, 12 Nov 2012 23:53:32 -0800 Subject: [Pythonmac-SIG] IDLE won't start from app Message-ID: I was trying to use IDLE today, and it tried to open and then suddenly closed. I tried a few times to make sure it wasn't a fluke, but it didn't start. It worked perfectly before today. So I deleted a whole bunch of python2.7 files, and reinstalled python from the binary. Still doesn't work. Earlier today I installed tcl8.4.19, which i compiled with '-arch ppc64'. So i tried installing the Activestate universal version over it, and I assumed that would fix things, but it didn't help! I can still start IDLE from the terminal, using the command 'idle', or using 'python -m idlelib.idle'. Does anyone have any ideas as to what's going wrong? Did I break something with the ppc64 tcl install? From ronaldoussoren at mac.com Tue Nov 13 11:39:32 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 13 Nov 2012 11:39:32 +0100 Subject: [Pythonmac-SIG] IDLE won't start from app In-Reply-To: References: Message-ID: On 13 Nov, 2012, at 8:53, Christian Calderon wrote: > I was trying to use IDLE today, and it tried to open and then suddenly closed. I tried a few times to make sure it wasn't a fluke, but it didn't start. It worked perfectly before today. So I deleted a whole bunch of python2.7 files, and reinstalled python from the binary. Still doesn't work. Earlier today I installed tcl8.4.19, which i compiled with '-arch ppc64'. So i tried installing the Activestate universal version over it, and I assumed that would fix things, but it didn't help! I can still start IDLE from the terminal, using the command 'idle', or using 'python -m idlelib.idle'. Does anyone have any ideas as to what's going wrong? Did I break something with the ppc64 tcl install? You can start IDLE.app from the commandline as well using "/path/to/IDLE.app/Contents/MacOS/IDLE" as the command (where "/path/to" should be replaced by the directory where IDLE.app is located). This shows the stdout/stderr of IDLE.app in the terminal window, and with some luck this shows why it won't open anymore. Ronald > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG From nad at acm.org Tue Nov 13 21:13:41 2012 From: nad at acm.org (Ned Deily) Date: Tue, 13 Nov 2012 12:13:41 -0800 Subject: [Pythonmac-SIG] IDLE won't start from app References: Message-ID: In article , Ronald Oussoren wrote: > On 13 Nov, 2012, at 8:53, Christian Calderon > wrote: > > I was trying to use IDLE today, and it tried to open and then suddenly > > closed. I tried a few times to make sure it wasn't a fluke, but it didn't > > start. It worked perfectly before today. So I deleted a whole bunch of > > python2.7 files, and reinstalled python from the binary. Still doesn't > > work. Earlier today I installed tcl8.4.19, which i compiled with '-arch > > ppc64'. So i tried installing the Activestate universal version over it, > > and I assumed that would fix things, but it didn't help! I can still start > > IDLE from the terminal, using the command 'idle', or using 'python -m > > idlelib.idle'. Does anyone have any ideas as to what's going wrong? Did I > > break something with the ppc64 tcl install? > > You can start IDLE.app from the commandline as well using > "/path/to/IDLE.app/Contents/MacOS/IDLE" as the command (where "/path/to" > should be replaced by the directory where IDLE.app is located). > > This shows the stdout/stderr of IDLE.app in the terminal window, and with > some luck this shows why it won't open anymore. Also, check the system log in Console.app. -- Ned Deily, nad at acm.org From emanuelesantos at gmail.com Thu Nov 15 21:00:36 2012 From: emanuelesantos at gmail.com (Emanuele Santos) Date: Thu, 15 Nov 2012 17:00:36 -0300 Subject: [Pythonmac-SIG] Building an extensible bundle with py2app In-Reply-To: <2C2A1F22-59B4-4FFE-8B58-E66D2FB0EAF7@mac.com> References: <2C2A1F22-59B4-4FFE-8B58-E66D2FB0EAF7@mac.com> Message-ID: Hi, Ronald Thanks for your suggestion. Your solution works great when I install the additional packages from outside my application. But as we want to make our users' life easier, we would like to install the additional packages into the user's provided folder from our bundle. As I was trying to implement this, I came across another problem that maybe you know a solution for it. If I try to run the system's easy_install it doesn't work. The error message was not very helpful but I think it's because I can't create a child process running a different interpreter. I am using subprocess.Popen() to start the process: {{{ Traceback (most recent call last): File "/usr/bin/easy_install-2.7", line 7, in from pkg_resources import load_entry_point File "pkg_resources.pyc", line 698, in File "pkg_resources.pyc", line 701, in Environment File "pkg_resources.pyc", line 99, in get_supported_platform File "pkg_resources.pyc", line 209, in _macosx_vers File "platform.pyc", line 804, in mac_ver File "platform.pyc", line 781, in _mac_ver_xml File "plistlib.pyc", line 78, in readPlist File "plistlib.pyc", line 401, in parse File "xml/parsers/expat.pyc", line 4, in ImportError: dlopen(/Applications/MyApp.app/Contents/Resources/lib/python2.7/lib-dynload/pyexpat.so, 2): Symbol not found: __Py_HashSecret Referenced from: /Applications/MyApp.app/Contents/Resources/lib/python2.7/lib-dynload/pyexpat.so Expected in: flat namespace in /Applications/MyApp.app/Contents/Resources/lib/python2.7/lib-dynload/pyexpat.so }}} If I try to include setuptools in the bundle so I can run easy_install with the same interpreter, I get errors with missing variables in site.py. But after adding those variables just to see how far I would go, I get this error: {{{ Traceback (most recent call last): File "/Applications/MyApp.app/Contents/Resources/lib/python2.7/gui/bundles/easy_install.py", line 10, in from setuptools.command.easy_install import main File "/Applications/MyApp.app/Contents/Resources/lib/python2.7/setuptools/command/easy_install.py", line 21, in from setuptools.package_index import PackageIndex, parse_bdist_wininst File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/setuptools/package_index.py", line 145, in urllib2.__version__, require('setuptools')[0].version File "pkg_resources.pyc", line 666, in require File "pkg_resources.pyc", line 565, in resolve pkg_resources.DistributionNotFound: setuptools }}} Any ideas how I solve this? Thanks, -- Emanuele. On Wed, Oct 17, 2012 at 11:45 AM, Ronald Oussoren wrote: > > On 17 Oct, 2012, at 16:12, Emanuele Santos > wrote: > > > Hi, all > > > > We build a bundle with py2app and we would like to make it extensible so > users could install on demand other python packages into the python > framework included in the bundle, for example by running easy_install. > > > > Is there a recommended way of doing that? I noticed that the site.py > file included in the bundle is not complete so when I tried using the > --user command line option or setting the $PYTHONHOME, I got an error. > > I wouldn't change the application bundle itself, but would add an option > to load python code from a user specified location. There are two reasons > for not changing the application bundle itself: that would invalidate code > signatures, and users cannot necessarily write into the bundle (I tend to > install applications using a separate account with more privileges than my > normal account). > > One way to do this is adding something like this to your application's > startup code: > > import os > import site > > site.addsitedir(os.path.expanduser("~/Library/Application > Support/MyApp/Python")) > > Users can then install additional modules in "~/Library/Application > Support/MyApp/Python" and your application can then use them. > > If you're using a semi-standalone build (for example because you use > Apple's python build) you can also use the "--site-packages" option to add > the default site-packages directory to your application's search path. > However, when I look at the code that not only just works for > semi-standalone builds, but I'm also also not sure if the code that adds > ~/Library/Python/... to sys.path actually works. > > Ronald > > > > Thanks, > > > > -- Emanuele. > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Fri Nov 16 08:21:32 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 16 Nov 2012 08:21:32 +0100 Subject: [Pythonmac-SIG] Building an extensible bundle with py2app In-Reply-To: References: <2C2A1F22-59B4-4FFE-8B58-E66D2FB0EAF7@mac.com> Message-ID: On 15 Nov, 2012, at 21:00, Emanuele Santos wrote: > Hi, Ronald > > Thanks for your suggestion. Your solution works great when I install the additional packages from outside my application. But as we want to make our users' life easier, we would like to install the additional packages into the user's provided folder from our bundle. > > As I was trying to implement this, I came across another problem that maybe you know a solution for it. If I try to run the system's easy_install it doesn't work. The error message was not very helpful but I think it's because I can't create a child process running a different interpreter. I am using subprocess.Popen() to start the process: > {{{ > Traceback (most recent call last): > File "/usr/bin/easy_install-2.7", line 7, in > from pkg_resources import load_entry_point > File "pkg_resources.pyc", line 698, in > File "pkg_resources.pyc", line 701, in Environment > File "pkg_resources.pyc", line 99, in get_supported_platform > File "pkg_resources.pyc", line 209, in _macosx_vers > File "platform.pyc", line 804, in mac_ver > File "platform.pyc", line 781, in _mac_ver_xml > File "plistlib.pyc", line 78, in readPlist > File "plistlib.pyc", line 401, in parse > File "xml/parsers/expat.pyc", line 4, in > ImportError: dlopen(/Applications/MyApp.app/Contents/Resources/lib/python2.7/lib-dynload/pyexpat.so, 2): Symbol not found: __Py_HashSecret > Referenced from: /Applications/MyApp.app/Contents/Resources/lib/python2.7/lib-dynload/pyexpat.so > Expected in: flat namespace > in /Applications/MyApp.app/Contents/Resources/lib/python2.7/lib-dynload/pyexpat.so > }}} PyHash_Secret is new in the latest 2.7 release (it was introduced by a fix for a security vulnerability). You problem use python 2.7.3 to build the plugin/extension bundle, but the hosting proces uses an older version of python. > > If I try to include setuptools in the bundle so I can run easy_install with the same interpreter, I get errors with missing variables in site.py. But after adding those variables just to see how far I would go, I get this error: > > {{{ > Traceback (most recent call last): > File "/Applications/MyApp.app/Contents/Resources/lib/python2.7/gui/bundles/easy_install.py", line 10, in > from setuptools.command.easy_install import main > File "/Applications/MyApp.app/Contents/Resources/lib/python2.7/setuptools/command/easy_install.py", line 21, in > from setuptools.package_index import PackageIndex, parse_bdist_wininst > File "/Applications/VisTrails/VisTrails.app/Contents/Resources/lib/python2.7/setuptools/package_index.py", line 145, in > urllib2.__version__, require('setuptools')[0].version > File "pkg_resources.pyc", line 666, in require > File "pkg_resources.pyc", line 565, in resolve > pkg_resources.DistributionNotFound: setuptools > }}} > > Any ideas how I solve this? That's issue #1 in the py2app tracker (): py2app doesn't copy the setuptools metadata into the created bundles. This amongst others means that pkg_resources cannot find the information it needs to determine if a package is installed. I haven't had time to add this feature to py2app yet, doing it cleanly is slightly more involved that I like. In particular, py2app needs to determine for every python module which distutils package it belongs to and that given multiple ways in which packages can be installed (setuptools zipped eggs, setuptools unzipped eggs, pip (setuptools --single-version-externally-managed with record file in the install tree), setuptools develop links, ...). For some installation methods (in particular --single-version-externally-managed without a record file) it might not be not possible to reliable detect which package a module belongs to. Ronald > > Thanks, > > -- Emanuele. > > > On Wed, Oct 17, 2012 at 11:45 AM, Ronald Oussoren wrote: > > On 17 Oct, 2012, at 16:12, Emanuele Santos wrote: > > > Hi, all > > > > We build a bundle with py2app and we would like to make it extensible so users could install on demand other python packages into the python framework included in the bundle, for example by running easy_install. > > > > Is there a recommended way of doing that? I noticed that the site.py file included in the bundle is not complete so when I tried using the --user command line option or setting the $PYTHONHOME, I got an error. > > I wouldn't change the application bundle itself, but would add an option to load python code from a user specified location. There are two reasons for not changing the application bundle itself: that would invalidate code signatures, and users cannot necessarily write into the bundle (I tend to install applications using a separate account with more privileges than my normal account). > > One way to do this is adding something like this to your application's startup code: > > import os > import site > > site.addsitedir(os.path.expanduser("~/Library/Application Support/MyApp/Python")) > > Users can then install additional modules in "~/Library/Application Support/MyApp/Python" and your application can then use them. > > If you're using a semi-standalone build (for example because you use Apple's python build) you can also use the "--site-packages" option to add the default site-packages directory to your application's search path. However, when I look at the code that not only just works for semi-standalone builds, but I'm also also not sure if the code that adds ~/Library/Python/... to sys.path actually works. > > Ronald > > > > Thanks, > > > > -- Emanuele. > > > > _______________________________________________ > > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > > http://mail.python.org/mailman/listinfo/pythonmac-sig > > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tismer at stackless.com Sat Nov 24 21:50:52 2012 From: tismer at stackless.com (Christian Tismer) Date: Sat, 24 Nov 2012 21:50:52 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: References: Message-ID: <50B1332C.3070706@stackless.com> Howdy, On 31.05.12 21:46, Michael McCracken wrote: > New user, so new thread, in reference to "(PyQt and py2app) Gui starts > in IDLE but not as app". > > This happens when Qt loads image plugins from the > system location (likely set during Qt's configure), which > then load the system Qt. > > The problem and a workaround are described here: > http://lists.trolltech.com/qt-interest/2008-09/thread00258-0.html > > py2app's PyQt sample doesn't exercise enough of Qt to hit this problem. > I'm not sure exactly what part of Qt you'd need to trigger it, but > I guess the Color Picker might work. > > The quick way, if you know you don't need these plugins, is to > create an empty qt.conf file at MyApp.app/Contents/Resources/qt.conf. > ... I've hit a similar problem when trying to build a stand-alone pyside. Starting with a modified setup.py (not yet ready), I created a working pyside for virtualenv. The missing part was support for 'setup.py --standalone', so I found macholib which does a great job in creating the missing bits. I simply used a few lines of Python to try out if macholib works for me, like so: > from macholib.MachOStandalone import MachOStandalone > from macholib.util import strip_files > path='/Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide' > files = MachOStandalone(path).run(contents='@rpath/Contents') This works great so far, but the generated pyside complains about duplicate libraries. When I uninstall Qt, it does not find its image plugins. I guess there is a bug somewhere, which causes the following observation: $ otool -L /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib: libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/local/Cellar/qt/4.8.3/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) $ otool -L /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib: @rpath/Contents/mageformats/libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/Contents/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) @rpath/Contents/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) The problem might be this line: @rpath/Contents/mageformats/libqtiff.dylib The "i" from "imageformats" is missing! This _might_ be related to the unusual case that "libqtiff" has no path at all, or something else is funny, and we end up with a name that will not be found at all. Then the loader finds the plugin in the installed Qt, which causes it to load everything again from there. Is that a possible explaining? I just found that and had not the time to debug it thoroughly. Cheers - Chris -- Christian Tismer :^) Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From ronaldoussoren at mac.com Sun Nov 25 14:36:49 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 25 Nov 2012 14:36:49 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: <50B1332C.3070706@stackless.com> References: <50B1332C.3070706@stackless.com> Message-ID: <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> On 24 Nov, 2012, at 21:50, Christian Tismer wrote: > Howdy, > > On 31.05.12 21:46, Michael McCracken wrote: >> New user, so new thread, in reference to "(PyQt and py2app) Gui starts >> in IDLE but not as app". >> >> This happens when Qt loads image plugins from the >> system location (likely set during Qt's configure), which >> then load the system Qt. >> >> The problem and a workaround are described here: >> http://lists.trolltech.com/qt-interest/2008-09/thread00258-0.html >> >> py2app's PyQt sample doesn't exercise enough of Qt to hit this problem. >> I'm not sure exactly what part of Qt you'd need to trigger it, but >> I guess the Color Picker might work. >> >> The quick way, if you know you don't need these plugins, is to >> create an empty qt.conf file at MyApp.app/Contents/Resources/qt.conf. >> > ... > > I've hit a similar problem when trying to build a stand-alone pyside. > Starting with a modified setup.py (not yet ready), I created a working > pyside for virtualenv. > The missing part was support for 'setup.py --standalone', so I found > macholib which does a great job in creating the missing bits. I don't quite understand, does "python setup.py py2app" not work with pyside in a virtualenv? If so: did you have to do anything special to build such a pyside? > > I simply used a few lines of Python to try out if macholib works for me, > like so: > >> from macholib.MachOStandalone import MachOStandalone >> from macholib.util import strip_files >> path='/Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide' >> files = MachOStandalone(path).run(contents='@rpath/Contents') You can also use "python -m macholib standalone" with recent releases of macholib. > > This works great so far, but the generated pyside complains about duplicate libraries. > When I uninstall Qt, it does not find its image plugins. > > I guess there is a bug somewhere, which causes the following observation: This looks like a problem that is hopefully fixed for PyQt: Qt probably uses the wrong prefix to find its addons (the virtualenv location instead of the application bundle), and that causes it to load an image plugin from the virtualenv which again pulls in libQt from the virtualenv and then you end up with duplicate symbols and later on a crash. For PyQt this was fixed by loading a qt.conf into the application bundle, I added simular code for pyside, but that obviously didn't work. > > $ otool -L /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib > /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib: > libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) > /usr/local/Cellar/qt/4.8.3/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) > /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) > > $ otool -L /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib > /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib: > @rpath/Contents/mageformats/libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) > @rpath/Contents/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) > @rpath/Contents/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) > > The problem might be this line: > @rpath/Contents/mageformats/libqtiff.dylib > > The "i" from "imageformats" is missing! > > This _might_ be related to the unusual case that "libqtiff" has no path at all, or something else > is funny, and we end up with a name that will not be found at all. > Then the loader finds the plugin in the installed Qt, which causes it to load everything > again from there. > > Is that a possible explaining? > I just found that and had not the time to debug it thoroughly. Did you use the most recent release of py2app? If so, there is pyside support code in py2app/recipes/pyside.py and support code for PyQt in py2app/recipes/sip.py. The latter works with PyQt on my machine, although with a system-wide install not an installation in a virtualenv. Ronald From tismer at stackless.com Sun Nov 25 21:02:35 2012 From: tismer at stackless.com (Christian Tismer) Date: Sun, 25 Nov 2012 21:02:35 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> References: <50B1332C.3070706@stackless.com> <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> Message-ID: <50B2795B.3080104@stackless.com> Hi Ronald, maybe my way to reply to this thread was the wrong approach. I thought I had found the reason why Michael had problems, because I hit that, too. But it was not a py2app question at all that I wanted to ask. Instead I thought you are the current maintainer of macholib, and I wanted to point you at a possible bug in there that is hidden since a long time. I will ask a specific question about what I found and contact the author of macholib. Is it you, or still Bob Ippolito? Sorry for being confusing ;-) Cheers - Chris On 11/25/12 2:36 PM, Ronald Oussoren wrote: > On 24 Nov, 2012, at 21:50, Christian Tismer wrote: > >> Howdy, >> >> On 31.05.12 21:46, Michael McCracken wrote: >>> New user, so new thread, in reference to "(PyQt and py2app) Gui starts >>> in IDLE but not as app". >>> >>> This happens when Qt loads image plugins from the >>> system location (likely set during Qt's configure), which >>> then load the system Qt. >>> >>> The problem and a workaround are described here: >>> http://lists.trolltech.com/qt-interest/2008-09/thread00258-0.html >>> >>> py2app's PyQt sample doesn't exercise enough of Qt to hit this problem. >>> I'm not sure exactly what part of Qt you'd need to trigger it, but >>> I guess the Color Picker might work. >>> >>> The quick way, if you know you don't need these plugins, is to >>> create an empty qt.conf file at MyApp.app/Contents/Resources/qt.conf. >>> >> ... >> >> I've hit a similar problem when trying to build a stand-alone pyside. >> Starting with a modified setup.py (not yet ready), I created a working >> pyside for virtualenv. >> The missing part was support for 'setup.py --standalone', so I found >> macholib which does a great job in creating the missing bits. > I don't quite understand, does "python setup.py py2app" not work with pyside in a virtualenv? > > If so: did you have to do anything special to build such a pyside? > >> I simply used a few lines of Python to try out if macholib works for me, >> like so: >> >>> from macholib.MachOStandalone import MachOStandalone >>> from macholib.util import strip_files >>> path='/Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide' >>> files = MachOStandalone(path).run(contents='@rpath/Contents') > You can also use "python -m macholib standalone" with recent releases > of macholib. > >> This works great so far, but the generated pyside complains about duplicate libraries. >> When I uninstall Qt, it does not find its image plugins. >> >> I guess there is a bug somewhere, which causes the following observation: > This looks like a problem that is hopefully fixed for PyQt: Qt probably uses the > wrong prefix to find its addons (the virtualenv location instead of the application bundle), > and that causes it to load an image plugin from the virtualenv which again pulls > in libQt from the virtualenv and then you end up with duplicate symbols and later > on a crash. > > For PyQt this was fixed by loading a qt.conf into the application bundle, I added > simular code for pyside, but that obviously didn't work. > >> $ otool -L /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib >> /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib: >> libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) >> /usr/local/Cellar/qt/4.8.3/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) >> /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) >> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) >> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) >> >> $ otool -L /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib >> /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib: >> @rpath/Contents/mageformats/libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) >> @rpath/Contents/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) >> @rpath/Contents/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) >> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) >> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) >> >> The problem might be this line: >> @rpath/Contents/mageformats/libqtiff.dylib >> >> The "i" from "imageformats" is missing! >> >> This _might_ be related to the unusual case that "libqtiff" has no path at all, or something else >> is funny, and we end up with a name that will not be found at all. >> Then the loader finds the plugin in the installed Qt, which causes it to load everything >> again from there. >> >> Is that a possible explaining? >> I just found that and had not the time to debug it thoroughly. > Did you use the most recent release of py2app? > > If so, there is pyside support code in py2app/recipes/pyside.py and support code > for PyQt in py2app/recipes/sip.py. The latter works with PyQt on my machine, > although with a system-wide install not an installation in a virtualenv. > > Ronald > -- Christian Tismer :^) Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From ronaldoussoren at mac.com Sun Nov 25 21:31:24 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 25 Nov 2012 21:31:24 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: <50B2795B.3080104@stackless.com> References: <50B1332C.3070706@stackless.com> <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> <50B2795B.3080104@stackless.com> Message-ID: <224AC16E-1DA6-4492-822E-4BC4A4817BC0@mac.com> I'm the maintainer of macholib as well (and the rest of the py2app stack) Ronald Sent from my iPad On 25 nov. 2012, at 21:02, Christian Tismer wrote: > Hi Ronald, > > maybe my way to reply to this thread was the wrong approach. > I thought I had found the reason why Michael had problems, > because I hit that, too. > > But it was not a py2app question at all that I wanted to ask. > > Instead I thought you are the current maintainer of macholib, > and I wanted to point you at a possible bug in there that is > hidden since a long time. > > I will ask a specific question about what I found and contact > the author of macholib. > > Is it you, or still Bob Ippolito? > > Sorry for being confusing ;-) > > > Cheers - Chris > > On 11/25/12 2:36 PM, Ronald Oussoren wrote: >> On 24 Nov, 2012, at 21:50, Christian Tismer wrote: >> >>> Howdy, >>> >>> On 31.05.12 21:46, Michael McCracken wrote: >>>> New user, so new thread, in reference to "(PyQt and py2app) Gui starts >>>> in IDLE but not as app". >>>> >>>> This happens when Qt loads image plugins from the >>>> system location (likely set during Qt's configure), which >>>> then load the system Qt. >>>> >>>> The problem and a workaround are described here: >>>> http://lists.trolltech.com/qt-interest/2008-09/thread00258-0.html >>>> >>>> py2app's PyQt sample doesn't exercise enough of Qt to hit this problem. >>>> I'm not sure exactly what part of Qt you'd need to trigger it, but >>>> I guess the Color Picker might work. >>>> >>>> The quick way, if you know you don't need these plugins, is to >>>> create an empty qt.conf file at MyApp.app/Contents/Resources/qt.conf. >>> ... >>> >>> I've hit a similar problem when trying to build a stand-alone pyside. >>> Starting with a modified setup.py (not yet ready), I created a working >>> pyside for virtualenv. >>> The missing part was support for 'setup.py --standalone', so I found >>> macholib which does a great job in creating the missing bits. >> I don't quite understand, does "python setup.py py2app" not work with pyside in a virtualenv? >> >> If so: did you have to do anything special to build such a pyside? >> >>> I simply used a few lines of Python to try out if macholib works for me, >>> like so: >>> >>>> from macholib.MachOStandalone import MachOStandalone >>>> from macholib.util import strip_files >>>> path='/Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide' >>>> files = MachOStandalone(path).run(contents='@rpath/Contents') >> You can also use "python -m macholib standalone" with recent releases >> of macholib. >> >>> This works great so far, but the generated pyside complains about duplicate libraries. >>> When I uninstall Qt, it does not find its image plugins. >>> >>> I guess there is a bug somewhere, which causes the following observation: >> This looks like a problem that is hopefully fixed for PyQt: Qt probably uses the >> wrong prefix to find its addons (the virtualenv location instead of the application bundle), >> and that causes it to load an image plugin from the virtualenv which again pulls >> in libQt from the virtualenv and then you end up with duplicate symbols and later >> on a crash. >> >> For PyQt this was fixed by loading a qt.conf into the application bundle, I added >> simular code for pyside, but that obviously didn't work. >> >>> $ otool -L /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib >>> /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib: >>> libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) >>> /usr/local/Cellar/qt/4.8.3/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) >>> /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) >>> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) >>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) >>> >>> $ otool -L /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib >>> /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib: >>> @rpath/Contents/mageformats/libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) >>> @rpath/Contents/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) >>> @rpath/Contents/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) >>> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) >>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) >>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) >>> >>> The problem might be this line: >>> @rpath/Contents/mageformats/libqtiff.dylib >>> >>> The "i" from "imageformats" is missing! >>> >>> This _might_ be related to the unusual case that "libqtiff" has no path at all, or something else >>> is funny, and we end up with a name that will not be found at all. >>> Then the loader finds the plugin in the installed Qt, which causes it to load everything >>> again from there. >>> >>> Is that a possible explaining? >>> I just found that and had not the time to debug it thoroughly. >> Did you use the most recent release of py2app? >> >> If so, there is pyside support code in py2app/recipes/pyside.py and support code >> for PyQt in py2app/recipes/sip.py. The latter works with PyQt on my machine, >> although with a system-wide install not an installation in a virtualenv. >> >> Ronald > > > -- > Christian Tismer :^) > Software Consulting : Have a break! Take a ride on Python's > Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ > 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de > phone +49 173 24 18 776 fax +49 (30) 700143-0023 > PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 > whom do you want to sponsor today? http://www.stackless.com/ > From tismer at stackless.com Mon Nov 26 00:18:42 2012 From: tismer at stackless.com (Christian Tismer) Date: Mon, 26 Nov 2012 00:18:42 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: <224AC16E-1DA6-4492-822E-4BC4A4817BC0@mac.com> References: <50B1332C.3070706@stackless.com> <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> <50B2795B.3080104@stackless.com> <224AC16E-1DA6-4492-822E-4BC4A4817BC0@mac.com> Message-ID: <50B2A752.7090702@stackless.com> Hi Ronald, I have run my install in Wing IDE and found out that the error was introduced by my wrong usage of MachOStandalone.py. I simply ran MachOStandalone.run(path) on the path of my pyside build, assuming that everything works from alone. I was not aware that MachOStandalone assumes that all roots live below a 'Contents' directory. things worked great for frameworks that are really in that place, but for plugins, things went wrong: The plugins live simply in 'plugins', which has 7 chars, not 8 ... So actually my usage of macholib was wrong, not macholib. I was not aware of a 'skipcontents' variable that assumes that the roots all live in that location. Sorry about the needless confusion. I will change my setup after having a look at the pyside support code. Standing corrected - sorry -- Chris On 11/25/12 9:31 PM, Ronald Oussoren wrote: > I'm the maintainer of macholib as well (and the rest of the py2app stack) > > Ronald > > Sent from my iPad > > On 25 nov. 2012, at 21:02, Christian Tismer wrote: > >> Hi Ronald, >> >> maybe my way to reply to this thread was the wrong approach. >> I thought I had found the reason why Michael had problems, >> because I hit that, too. >> >> But it was not a py2app question at all that I wanted to ask. >> >> Instead I thought you are the current maintainer of macholib, >> and I wanted to point you at a possible bug in there that is >> hidden since a long time. >> >> I will ask a specific question about what I found and contact >> the author of macholib. >> >> Is it you, or still Bob Ippolito? >> >> Sorry for being confusing ;-) >> >> >> Cheers - Chris >> >> On 11/25/12 2:36 PM, Ronald Oussoren wrote: >>> On 24 Nov, 2012, at 21:50, Christian Tismer wrote: >>> >>>> Howdy, >>>> >>>> On 31.05.12 21:46, Michael McCracken wrote: >>>>> New user, so new thread, in reference to "(PyQt and py2app) Gui starts >>>>> in IDLE but not as app". >>>>> >>>>> This happens when Qt loads image plugins from the >>>>> system location (likely set during Qt's configure), which >>>>> then load the system Qt. >>>>> >>>>> The problem and a workaround are described here: >>>>> http://lists.trolltech.com/qt-interest/2008-09/thread00258-0.html >>>>> >>>>> py2app's PyQt sample doesn't exercise enough of Qt to hit this problem. >>>>> I'm not sure exactly what part of Qt you'd need to trigger it, but >>>>> I guess the Color Picker might work. >>>>> >>>>> The quick way, if you know you don't need these plugins, is to >>>>> create an empty qt.conf file at MyApp.app/Contents/Resources/qt.conf. >>>> ... >>>> >>>> I've hit a similar problem when trying to build a stand-alone pyside. >>>> Starting with a modified setup.py (not yet ready), I created a working >>>> pyside for virtualenv. >>>> The missing part was support for 'setup.py --standalone', so I found >>>> macholib which does a great job in creating the missing bits. >>> I don't quite understand, does "python setup.py py2app" not work with pyside in a virtualenv? >>> >>> If so: did you have to do anything special to build such a pyside? >>> >>>> I simply used a few lines of Python to try out if macholib works for me, >>>> like so: >>>> >>>>> from macholib.MachOStandalone import MachOStandalone >>>>> from macholib.util import strip_files >>>>> path='/Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide' >>>>> files = MachOStandalone(path).run(contents='@rpath/Contents') >>> You can also use "python -m macholib standalone" with recent releases >>> of macholib. >>> >>>> This works great so far, but the generated pyside complains about duplicate libraries. >>>> When I uninstall Qt, it does not find its image plugins. >>>> >>>> I guess there is a bug somewhere, which causes the following observation: >>> This looks like a problem that is hopefully fixed for PyQt: Qt probably uses the >>> wrong prefix to find its addons (the virtualenv location instead of the application bundle), >>> and that causes it to load an image plugin from the virtualenv which again pulls >>> in libQt from the virtualenv and then you end up with duplicate symbols and later >>> on a crash. >>> >>> For PyQt this was fixed by loading a qt.conf into the application bundle, I added >>> simular code for pyside, but that obviously didn't work. >>> >>>> $ otool -L /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib >>>> /usr/local/Cellar/qt/4.8.3/plugins/imageformats/libqtiff.dylib: >>>> libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) >>>> /usr/local/Cellar/qt/4.8.3/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) >>>> /usr/local/Cellar/qt/4.8.3/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) >>>> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) >>>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) >>>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) >>>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) >>>> >>>> $ otool -L /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib >>>> /Users/tismer/src/daniel/pydica/lib/python2.7/site-packages/PySide/plugins/imageformats/libqtiff.dylib: >>>> @rpath/Contents/mageformats/libqtiff.dylib (compatibility version 0.0.0, current version 0.0.0) >>>> @rpath/Contents/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3) >>>> @rpath/Contents/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3) >>>> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) >>>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) >>>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) >>>> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0) >>>> >>>> The problem might be this line: >>>> @rpath/Contents/mageformats/libqtiff.dylib >>>> >>>> The "i" from "imageformats" is missing! >>>> >>>> This _might_ be related to the unusual case that "libqtiff" has no path at all, or something else >>>> is funny, and we end up with a name that will not be found at all. >>>> Then the loader finds the plugin in the installed Qt, which causes it to load everything >>>> again from there. >>>> >>>> Is that a possible explaining? >>>> I just found that and had not the time to debug it thoroughly. >>> Did you use the most recent release of py2app? >>> >>> If so, there is pyside support code in py2app/recipes/pyside.py and support code >>> for PyQt in py2app/recipes/sip.py. The latter works with PyQt on my machine, >>> although with a system-wide install not an installation in a virtualenv. >>> >>> Ronald >> >> -- >> Christian Tismer :^) >> Software Consulting : Have a break! Take a ride on Python's >> Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ >> 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de >> phone +49 173 24 18 776 fax +49 (30) 700143-0023 >> PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 >> whom do you want to sponsor today? http://www.stackless.com/ >> -- Christian Tismer :^) Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From ronaldoussoren at mac.com Mon Nov 26 10:28:30 2012 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 26 Nov 2012 10:28:30 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: <50B2A752.7090702@stackless.com> References: <50B1332C.3070706@stackless.com> <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> <50B2795B.3080104@stackless.com> <224AC16E-1DA6-4492-822E-4BC4A4817BC0@mac.com> <50B2A752.7090702@stackless.com> Message-ID: <6043E086-5B82-40EE-B961-B192D4FA3F24@mac.com> On 26 Nov, 2012, at 0:18, Christian Tismer wrote: > Hi Ronald, > > I have run my install in Wing IDE and found out that the error was > introduced by my wrong usage of MachOStandalone.py. > > I simply ran MachOStandalone.run(path) on the path of my pyside > build, assuming that everything works from alone. What are you trying to accomplish? > > I was not aware that MachOStandalone assumes that all roots live > below a 'Contents' directory. That's because the primary usecase for MachOStandalone is creating standalone OSX application or plugin bundles, and those always have a 'Contents' directory (and a particular directory structure w.r.t. the location where macholib can copy the libraries needed to make a bundle standalone) > things worked great for frameworks that are really in that place, > but for plugins, things went wrong: > > The plugins live simply in 'plugins', which has 7 chars, not 8 ... > > So actually my usage of macholib was wrong, not macholib. I was not > aware of a 'skipcontents' variable that assumes that the roots all > live in that location. > Sorry about the needless confusion. I will change my setup after > having a look at the pyside support code. I'm interested to hear about your particular usecase, it might be useful to document your usecase in the macholib documentation or even add full support for it. Ronald From tismer at stackless.com Thu Nov 29 00:58:58 2012 From: tismer at stackless.com (Christian Tismer) Date: Thu, 29 Nov 2012 00:58:58 +0100 Subject: [Pythonmac-SIG] py2app and PyQt: QT plugins cause loading multiple QT library versions In-Reply-To: <6043E086-5B82-40EE-B961-B192D4FA3F24@mac.com> References: <50B1332C.3070706@stackless.com> <8DBB5E24-05BC-4C81-AD16-7D473BC97C15@mac.com> <50B2795B.3080104@stackless.com> <224AC16E-1DA6-4492-822E-4BC4A4817BC0@mac.com> <50B2A752.7090702@stackless.com> <6043E086-5B82-40EE-B961-B192D4FA3F24@mac.com> Message-ID: <50B6A542.5060802@stackless.com> Hi Ronald, On 11/26/12 10:28 AM, Ronald Oussoren wrote: > On 26 Nov, 2012, at 0:18, Christian Tismer wrote: > >> Hi Ronald, >> >> I have run my install in Wing IDE and found out that the error was >> introduced by my wrong usage of MachOStandalone.py. >> >> I simply ran MachOStandalone.run(path) on the path of my pyside >> build, assuming that everything works from alone. > What are you trying to accomplish? I am hacking on the PySide installer for use in PIP or easy_install. >> ... > I'm interested to hear about your particular usecase, it might be useful > to document your usecase in the macholib documentation or even add > full support for it. Actually, this work is temporary, since I'm aiming at some review and inclusion into pyside-install. The original version is from Roman Lacko. https://github.com/PySide/pyside-setup Then, Daniel Brett wrote OS X support and sent a pull request. This was the real work, I want to give all credits to Daniel and Roman. I grabbed that pull request, turned it into a bitbucket project and extended it with a few work-arounds, and finally used macholib to create the "--standalone" modus. You can find the relevant addition here: https://bitbucket.org/pydica/pyside-setup/changeset/4b8be97e5a00b577fe30ce9aa7e5723ff2a66f94 Note that this repo is on bitbucket since I'm used to it. You can see the complete history here: https://bitbucket.org/pydica/pyside-setup/changesets This is not mean to be a fork, but just a clone, with the intent to prepare for inclusion. The use-case was laziness: Instead of adding a complex analysis of the references, I simply used macholib and let it do its thing, because the wheel was already invented. I'd also like to move more stuff to macholib instead of using the mac tools. The references to frameworks work great. The only wart is the rewrite of the names of plugin modules, which simply should not happen. But it is not a big deal, since I have to add a qt.conf file, anyway. (the last missing thing in my setup). Cheers - Chris -- Christian Tismer :^) Software Consulting : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de phone +49 173 24 18 776 fax +49 (30) 700143-0023 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ From alex.honeywell at gmail.com Sun Nov 11 23:26:09 2012 From: alex.honeywell at gmail.com (Alex Honeywell) Date: Sun, 11 Nov 2012 22:26:09 -0000 Subject: [Pythonmac-SIG] py2app error when launching built app Message-ID: I've got my app successfully bundled and built, but when I try to launch it from Finder I get "snakewatch: Error" and nothing else except "exited with error: 255" in Console. When I run the binary from Terminal instead, I get Traceback (most recent call last): File "/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py", line 7, in _reset_sys_path() File "/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py", line 4, in _reset_sys_path resources = os.environ['RESOURCEPATH'] File "UserDict.pyc", line 23, in __getitem__ KeyError: 'RESOURCEPATH' 2012-11-11 17:18:07.567 snakewatch[92013:707] snakewatch Error If I run "RESOURCEPATH=$(pwd)/Resources MacOS/snakewatch" I get Traceback (most recent call last): File "/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py", line 316, in _run() File "/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py", line 304, in _run argv0 = os.path.basename(os.environ['ARGVZERO']) File "UserDict.pyc", line 23, in __getitem__ KeyError: 'ARGVZERO' and if I run "RESOURCEPATH=$(pwd)/Resources ARGVZERO='' MacOS/snakewatch" it launches fine. Any reason why those variables wouldn't be set when I launch the app from Finder? Running py2app under a manually built Python 2.7.3 installation on Mountain Lion, and the same errors happen regardless of the argv_emulation value. Thanks, - Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From mohsen.jadidi at gmail.com Wed Nov 14 13:06:00 2012 From: mohsen.jadidi at gmail.com (llvllj) Date: Wed, 14 Nov 2012 12:06:00 -0000 Subject: [Pythonmac-SIG] Trouble building against Tkinter on 64-bit python.org python In-Reply-To: References: Message-ID: <1352894758934-4995840.post@n6.nabble.com> I still have problem with this issue and I don't know what I'm doing wrong. objc[1296]: Class TKApplication is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[1296]: Class TKMenu is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[1296]: Class TKContentView is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[1296]: Class TKWindow is implemented in both /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. Here is my* otool -L Tk* on both paths : /on "/Library/Frameworks/Tk.framework/Versions/8.5" / Tk: /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.11) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.29.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 15.0.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.29.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.32.0) /on /System/Library/Frameworks/Tk.framework/Versions/8.5 : / Tk: /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.9) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 629.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 829.0.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1125.0.0) and this is what I did: sudo install_name_tool -change /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk /Library/Frameworks/Tk.framework/Versions/8.5/Tk Tk but after that nothing changed at all. Can you provide me with more detail. I am not much familiar with Linker and C stuff. Thanks. -- View this message in context: http://python.6.n6.nabble.com/Trouble-building-against-Tkinter-on-64-bit-python-org-python-tp2154993p4995840.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. From tsrdatatech at gmail.com Thu Nov 22 03:13:28 2012 From: tsrdatatech at gmail.com (Tom Russell) Date: Thu, 22 Nov 2012 02:13:28 -0000 Subject: [Pythonmac-SIG] py2app error Message-ID: List, I am having an issue creating an app bundle using py2app and not sure what this means. I am using enthought edition on OSX 10.6.8. The alias output works but when I build a deployable version I get this output: Tom-Russells-MacBook-Pro:~ Tom$ python setup.py py2app running py2app creating /Users/Tom/build creating /Users/Tom/build/bdist.macosx-10.5-i386 creating /Users/Tom/build/bdist.macosx-10.5-i386/python2.7-standalone creating /Users/Tom/build/bdist.macosx-10.5-i386/python2.7-standalone/app creating /Users/Tom/build/bdist.macosx-10.5-i386/python2.7-standalone/app/collect creating /Users/Tom/build/bdist.macosx-10.5-i386/python2.7-standalone/app/temp creating /Users/Tom/dist creating build/bdist.macosx-10.5-i386/python2.7-standalone/app/lib-dynload creating build/bdist.macosx-10.5-i386/python2.7-standalone/app/Frameworks *** using recipe: virtualenv *** *** using recipe: sip *** *** using recipe: PIL *** *** using recipe: pyside *** *** using recipe: matplotlib *** *** using recipe: pydoc *** *** using recipe: docutils *** *** using recipe: scipy *** Traceback (most recent call last): File "setup.py", line 18, in setup_requires=['py2app'], File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/py2app-0.7.1-py2.7.egg/py2app/build_app.py", line 510, in run self._run() File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/py2app-0.7.1-py2.7.egg/py2app/build_app.py", line 698, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/py2app-0.7.1-py2.7.egg/py2app/build_app.py", line 773, in run_normal self.process_recipes(mf, filters, flatpackages, loader_files) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/py2app-0.7.1-py2.7.egg/py2app/build_app.py", line 667, in process_recipes find_needed_modules(mf, packages=rval['packages']) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/find_modules.py", line 219, in find_needed_modules m = mf.import_hook(package, None, ["*"]) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 688, in import_hook for s in self.ensure_fromlist(m, fromlist): File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 797, in ensure_fromlist submod = self.import_module(sub, fullname, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 765, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 871, in load_module m = self.load_package(fqname, pathname, packagepath) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1094, in load_package self.load_module(fqname, fp, buf, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 685, in import_hook m = self.load_tail(q, tail) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 780, in load_tail result = self.import_module(head, mname, result) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 871, in load_module m = self.load_package(fqname, pathname, packagepath) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1094, in load_package self.load_module(fqname, fp, buf, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1062, in scan_code self.scan_code(c, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1062, in scan_code self.scan_code(c, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1062, in scan_code self.scan_code(c, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 685, in import_hook m = self.load_tail(q, tail) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 780, in load_tail result = self.import_module(head, mname, result) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 871, in load_module m = self.load_package(fqname, pathname, packagepath) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1094, in load_package self.load_module(fqname, fp, buf, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 685, in import_hook m = self.load_tail(q, tail) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 780, in load_tail result = self.import_module(head, mname, result) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 685, in import_hook m = self.load_tail(q, tail) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 780, in load_tail result = self.import_module(head, mname, result) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 871, in load_module m = self.load_package(fqname, pathname, packagepath) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1094, in load_package self.load_module(fqname, fp, buf, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 871, in load_module m = self.load_package(fqname, pathname, packagepath) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1094, in load_package self.load_module(fqname, fp, buf, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 909, in load_module self.scan_code(co, m) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 1015, in scan_code imported_module = self._safe_import_hook(name, m, fromlist, level)[0] File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 917, in _safe_import_hook mods = self.import_hook(name, caller, level=level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 684, in import_hook q, tail = self.find_head_package(parent, name, level) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 758, in find_head_package q = self.import_module(head, qname, parent) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 847, in import_module m = self.load_module(fqname, fp, pathname, stuff) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/modulegraph-0.10.1-py2.7.egg/modulegraph/modulegraph.py", line 883, in load_module co = compile(contents, pathname, 'exec', 0, True) File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/sympy/mpmath/libmp/exec_py3.py", line 1 exec_ = exec ^ SyntaxError: invalid syntax Any ideas? Thanks, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: