PIL and Snow Leopard

View: New views
6 Messages — Rating Filter:   Alert me  

PIL and Snow Leopard

by Jerry LeVan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Snow Leopard seems to have severely broken my WxPython Postgresql  
database
browser tool... two or three queries and the app locks up or dies.

I have been trying to 'spiff up' its parent, a Tkinter based browser,  
which
still works except that I appear to have lost PIL, Image and Image-Tk  
some
where along the way so I cannot view images stored in the database any  
more.

Is building PIL on Snow Leopard 'easy' I have the apple python (32/64)  
installed
and the python.org 2.6.2 (32 bit) version installed.

Anyone have any experiences in building PIL in the above environment?

Anyone else having a problem with WxPython on Snow Leopard?

Thanks for any insights...

Jerry


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: PIL and Snow Leopard

by Ned Deily :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article <C6D2F15E-F3E9-4948-89D3-CC36B7525A4E@...>,
 Jerry LeVan <jerry.levan@...> wrote:

> Snow Leopard seems to have severely broken my WxPython Postgresql  
> database
> browser tool... two or three queries and the app locks up or dies.
>
> I have been trying to 'spiff up' its parent, a Tkinter based browser,  
> which
> still works except that I appear to have lost PIL, Image and Image-Tk  
> some
> where along the way so I cannot view images stored in the database any  
> more.
>
> Is building PIL on Snow Leopard 'easy' I have the apple python (32/64)  
> installed
> and the python.org 2.6.2 (32 bit) version installed.
>
> Anyone have any experiences in building PIL in the above environment?
>
> Anyone else having a problem with WxPython on Snow Leopard?
>
> Thanks for any insights...

This may not be related to what you are seeing with "lock ups" but a
number of people have seen problems with IDLE, which also uses Tkinter,
that comes with Apple's python 2.6 on Snow Leopard.  In 10.6, the Apple
python Tkinter is linked with Tk 8.5.7, believed to be the new Cocoa Tk.
At the moment, this problem has not been resolved; see
http://bugs.python.org/issue6864 .  The pythons installed by the
python.org OS X installers, including the newly released 2.6.3, don't
exhibit this problem because are linked with Tk 8.4, which is still
available and updated by Apple in 10.6.  Note that the python.org
pythons are still 32-bit-only Intel & ppc.

For what it's worth, the MacPorts py26-pil port builds fine on 10.6 with
the MacPorts python26.

--
 Ned Deily,
 nad@...

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: PIL and Snow Leopard

by jalopyuser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jerry LeVan <jerry.levan@...> wrote:

> Is building PIL on Snow Leopard 'easy' I have the apple python (32/64)
> installed and the python.org 2.6.2 (32 bit) version installed.

Yes, I just build it with /usr/bin/python, and it works fine.  Assuming
you have Xcode 3.2 installed.

Bill
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: PIL and Snow Leopard

by Jerry LeVan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 2, 2009, at 7:40 PM, Bill Janssen wrote:

> Jerry LeVan <jerry.levan@...> wrote:
>
>> Is building PIL on Snow Leopard 'easy' I have the apple python  
>> (32/64)
>> installed and the python.org 2.6.2 (32 bit) version installed.
>
> Yes, I just build it with /usr/bin/python, and it works fine.  
> Assuming
> you have Xcode 3.2 installed.
>
> Bill

Ugh, this is getting messy...

I think that I have built libfreetype.dylib and libjpeg.dylib as
i386 and x86_64 libs...at least that is what the file command asserts.

I then built the PIL package using the system python in 64 bit mode and
installed the rascal in the Apple python. All of the libs appear to be
multi-architecture ppc, i386 and x86_64

When I run apple python in 64 bit mode I can run the PIL demos...

If I restrict apple python to 32 bit mode all of the programs fail
with a bus error.

*********

I then tried to build PIL using the 2.6.2 python from python.org.
1) It would not build under gcc-4.2 I had to define CC=gcc-4.0
     the build appeared to succeed and I installed the PIL system.
2) All of the demos failed...

I noticed that _imagingtk.so was dynamically linked against
the ActiveState Tcl/Tk that is installed in /Library/Frameworks/
Tcl.framework

[mbp:/Library/Python/2.6/site-packages/PIL]$ otool -L _imagingtk.so
_imagingtk.so:
        /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility  
version 8.5.0, current version 8.5.4)
        /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility  
version 8.5.0, current version 8.5.4)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current  
version 124.1.1)

I suppose that I could hide the ActiveState versions by renaming the  
Frameworks...

But even if I did that, how could I force setup.py to use the apple  
8.4 tcl/tk system instead
of the 'current' 8.5 system?

Any suggestions as to how I can get PIL to work when apple python is  
in 32 bit mode?

Any suggestions as to how I can build PIL using the 2.6.2 version of  
Python from python.org?

This is getting ugly...too many impedance mismatches.

Jerry


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: PIL and Snow Leopard

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jerry LeVan wrote:
> Snow Leopard seems to have severely broken my WxPython Postgresql database
> browser tool... two or three queries and the app locks up or dies.
>
> I have been trying to 'spiff up' its parent, a Tkinter based browser, which
> still works except that I appear to have lost PIL, Image and Image-Tk some
> where along the way so I cannot view images stored in the database any
> more.

I'm a little confused about which packages you are having trouble with:

TkInter
PIL
wxPython.

Clearly building PIL is an issue for you, but what about the other two?
In particular, what wxPython issues are you having? I don't have Snow
Leopard, but I'd like to know if there are wxPython issues for the
future, and for when I distribute apps for others to run.

By the way, if wxPyhon does work OK, it can do a fair bit of image
loading/processing, so maybe you don't need PIL for your app.

NOTE 2: if you get PIL building, it would be great if you could build a
version that statically links the non-standard dependencies, and post it
somewhere (preferably give it to Fredrik for him to put up on the PIL site.

-Chris

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: PIL and Snow Leopard

by Robert Kern-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-10-04 15:19 PM, Christopher Barker wrote:

> Clearly building PIL is an issue for you, but what about the other two?
> In particular, what wxPython issues are you having? I don't have Snow
> Leopard, but I'd like to know if there are wxPython issues for the
> future, and for when I distribute apps for others to run.

OS X's 64-bit subsystem, now standard in Snow Leopard, does not have Carbon for
UIs, only Cocoa. wxPython is still built against Carbon. wxCocoa is still in
development.

32-bit builds of Python can still work with wxPython on Snow Leopard, though.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig