Quantcast

PIL for python 3.2

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PIL for python 3.2

Ingo Randolf
hello.

i want to use PIL with python 3.2.
Any ideas when PIL will be available for python32?

thanks
ingo
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIL for python 3.2

Ingo Randolf
hi all.

i had a look into porting PIL for use with python 3.2

well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

this happens with any image-kind...

i am new to python, and to PIL... so i have no idea why this happens...

it would be great if PIL would be able to be used with python3.2!

maybe somebody more skilled than me can make it run?

here is the modified version:
http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip

ingo



Am 09.08.2011 um 18:18 schrieb Ingo Randolf:

> hello.
>
> i want to use PIL with python 3.2.
> Any ideas when PIL will be available for python32?
>
> thanks
> ingo
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIL for python 3.2

Ingo Randolf
Hello.

another attempt to make PIL run with python3.2 on osx 10.6.7

I found an unofficial release of PIL for py3.2:
https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb

it compiles and installs fine with python3.2

when i want to open an image i get:
IOError: cannot identify image file

with any type of image...

compiling PIL says:
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok


i do:
>>> from PIL import Image
>>> im = Image.open("path/to/my/image.jpg")

i am on: osx 10.6.7

what am i doing wrong?


please help.
thanks
ingo


Am 23.08.2011 um 14:29 schrieb Ingo Randolf:

> hi all.
>
> i had a look into porting PIL for use with python 3.2
>
> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback:
>
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open
>    raise IOError("cannot identify image file")
> IOError: cannot identify image file
>
> this happens with any image-kind...
>
> i am new to python, and to PIL... so i have no idea why this happens...
>
> it would be great if PIL would be able to be used with python3.2!
>
> maybe somebody more skilled than me can make it run?
>
> here is the modified version:
> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip
>
> ingo
>
>
>
> Am 09.08.2011 um 18:18 schrieb Ingo Randolf:
>
>> hello.
>>
>> i want to use PIL with python 3.2.
>> Any ideas when PIL will be available for python32?
>>
>> thanks
>> ingo
>> _______________________________________________
>> Image-SIG maillist  -  [hidden email]
>> http://mail.python.org/mailman/listinfo/image-sig
>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIL for python 3.2

Chris Barker
On 8/26/11 8:19 AM, Ingo Randolf wrote:
> another attempt to make PIL run with python3.2 on osx 10.6.7
>
> I found an unofficial release of PIL for py3.2:
> https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb
>
> it compiles and installs fine with python3.2
>
> when i want to open an image i get:
> IOError: cannot identify image file

IIRC, PIL comes with some test code that you can run that tests the C
directly, outside of Python --have you tried that? It may give you some
hints.

Other than that, you are in uncharted waters -- I'd try asking the
author of that port. Otherwise, it seems unlikely that we will have a
robust PIL on 3.* until Fredrik gets directly involved :-(

-Chris




> with any type of image...
>
> compiling PIL says:
> --- TKINTER support ok
> --- JPEG support ok
> --- ZLIB (PNG/ZIP) support ok
> --- FREETYPE2 support ok
>
>
> i do:
>>>> from PIL import Image
>>>> im = Image.open("path/to/my/image.jpg")
>
> i am on: osx 10.6.7
>
> what am i doing wrong?
>
>
> please help.
> thanks
> ingo
>
>
> Am 23.08.2011 um 14:29 schrieb Ingo Randolf:
>
>> hi all.
>>
>> i had a look into porting PIL for use with python 3.2
>>
>> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback:
>>
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in<module>
>>   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open
>>     raise IOError("cannot identify image file")
>> IOError: cannot identify image file
>>
>> this happens with any image-kind...
>>
>> i am new to python, and to PIL... so i have no idea why this happens...
>>
>> it would be great if PIL would be able to be used with python3.2!
>>
>> maybe somebody more skilled than me can make it run?
>>
>> here is the modified version:
>> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip
>>
>> ingo
>>
>>
>>
>> Am 09.08.2011 um 18:18 schrieb Ingo Randolf:
>>
>>> hello.
>>>
>>> i want to use PIL with python 3.2.
>>> Any ideas when PIL will be available for python32?
>>>
>>> thanks
>>> ingo
>>> _______________________________________________
>>> Image-SIG maillist  -  [hidden email]
>>> http://mail.python.org/mailman/listinfo/image-sig
>>
>> _______________________________________________
>> Image-SIG maillist  -  [hidden email]
>> http://mail.python.org/mailman/listinfo/image-sig
>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig


--
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

[hidden email]
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIL for python 3.2

Charlie Clark-6
In reply to this post by Ingo Randolf
Am 26.08.2011, 17:19 Uhr, schrieb Ingo Randolf <[hidden email]>:

> Hello.
> another attempt to make PIL run with python3.2 on osx 10.6.7
> I found an unofficial release of PIL for py3.2:
> https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb
> it compiles and installs fine with python3.2

Hi Ingo,

for support on the fork you should contact it's developer. You might need  
to create a debug build of Python to find out exactly what's not working.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIL for python 3.2

Christoph Gohlke
In reply to this post by Ingo Randolf
Hi Ingo,

Before attempting to build PIL for Python 3.x make sure you are able to
correctly build PIL for Python 2.x from the official source
distribution. All tests should pass.

python setup.py clean --all
python make-manifest.py
python setup.py build_ext -i
python selftest.py
python Tests\run.py

Consider using PIL-1.1.7-py3-source.zip from
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil>. It builds and passes
all selftests on my Windows and Ubuntu systems.

Christoph



On 8/26/2011 8:19 AM, Ingo Randolf wrote:

> Hello.
>
> another attempt to make PIL run with python3.2 on osx 10.6.7
>
> I found an unofficial release of PIL for py3.2:
> https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb
>
> it compiles and installs fine with python3.2
>
> when i want to open an image i get:
> IOError: cannot identify image file
>
> with any type of image...
>
> compiling PIL says:
> --- TKINTER support ok
> --- JPEG support ok
> --- ZLIB (PNG/ZIP) support ok
> --- FREETYPE2 support ok
>
>
> i do:
>>>> from PIL import Image
>>>> im = Image.open("path/to/my/image.jpg")
>
> i am on: osx 10.6.7
>
> what am i doing wrong?
>
>
> please help.
> thanks
> ingo
>
>
> Am 23.08.2011 um 14:29 schrieb Ingo Randolf:
>
>> hi all.
>>
>> i had a look into porting PIL for use with python 3.2
>>
>> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback:
>>
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in<module>
>>   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open
>>     raise IOError("cannot identify image file")
>> IOError: cannot identify image file
>>
>> this happens with any image-kind...
>>
>> i am new to python, and to PIL... so i have no idea why this happens...
>>
>> it would be great if PIL would be able to be used with python3.2!
>>
>> maybe somebody more skilled than me can make it run?
>>
>> here is the modified version:
>> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip
>>
>> ingo
>>
>>
>>
>> Am 09.08.2011 um 18:18 schrieb Ingo Randolf:
>>
>>> hello.
>>>
>>> i want to use PIL with python 3.2.
>>> Any ideas when PIL will be available for python32?
>>>
>>> thanks
>>> ingo
>>> _______________________________________________
>>> Image-SIG maillist  -  [hidden email]
>>> http://mail.python.org/mailman/listinfo/image-sig
>>
>> _______________________________________________
>> Image-SIG maillist  -  [hidden email]
>> http://mail.python.org/mailman/listinfo/image-sig
>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig
>
>
_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIL for python 3.2

Ingo Randolf
Hello.

Thanks for all the replies. it is working now!

it turned out, that there was a problem with libjpeg... i found some resources concerning the topic
pil on snow-leopard:

http://stackoverflow.com/questions/1518573/snow-leopard-python-2-6-problems-getting-pil-to-work
http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/


----


what i did:

- remove all the libjpeg.* in various folders: /sw/lib /opt/local/lib (attention you might break something if you do that...)
- recompile and install libjpeg (8c) with ./configure --enable-shared --enable-static
- recompile PIL (i finally used this source: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil)
        for non-windows version you have to alter the setup.py file though

        at the top you find:
if sys.platform == "win32":

after the if-block i added:

else:
    FREETYPE_ROOT = None
    JPEG_ROOT = libinclude("/usr/local")
    TIFF_ROOT = None
    ZLIB_ROOT = None
    TCL_ROOT = None
    LCMS_ROOT = None


see the JPEG_ROOT!

- after recompiling PIL i checked if _imaging.so is linking to libjepg:

$ otool -L build/lib.bla/_imaging.so
        /usr/local/lib/libjpeg.8.dylib (compatibility version 12.0.0, current version 12.0.0)
        /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

so linking went fine.

- after installing i could finally use PIL with python3.2

:)
great!

thx
ingo



Am 26.08.2011 um 19:03 schrieb Christoph Gohlke:

> Hi Ingo,
>
> Before attempting to build PIL for Python 3.x make sure you are able to correctly build PIL for Python 2.x from the official source distribution. All tests should pass.
>
> python setup.py clean --all
> python make-manifest.py
> python setup.py build_ext -i
> python selftest.py
> python Tests\run.py
>
> Consider using PIL-1.1.7-py3-source.zip from <http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil>. It builds and passes all selftests on my Windows and Ubuntu systems.
>
> Christoph
>
>
>
> On 8/26/2011 8:19 AM, Ingo Randolf wrote:
>> Hello.
>>
>> another attempt to make PIL run with python3.2 on osx 10.6.7
>>
>> I found an unofficial release of PIL for py3.2:
>> https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb
>>
>> it compiles and installs fine with python3.2
>>
>> when i want to open an image i get:
>> IOError: cannot identify image file
>>
>> with any type of image...
>>
>> compiling PIL says:
>> --- TKINTER support ok
>> --- JPEG support ok
>> --- ZLIB (PNG/ZIP) support ok
>> --- FREETYPE2 support ok
>>
>>
>> i do:
>>>>> from PIL import Image
>>>>> im = Image.open("path/to/my/image.jpg")
>>
>> i am on: osx 10.6.7
>>
>> what am i doing wrong?
>>
>>
>> please help.
>> thanks
>> ingo
>>
>>
>> Am 23.08.2011 um 14:29 schrieb Ingo Randolf:
>>
>>> hi all.
>>>
>>> i had a look into porting PIL for use with python 3.2
>>>
>>> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback:
>>>
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in<module>
>>>  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open
>>>    raise IOError("cannot identify image file")
>>> IOError: cannot identify image file
>>>
>>> this happens with any image-kind...
>>>
>>> i am new to python, and to PIL... so i have no idea why this happens...
>>>
>>> it would be great if PIL would be able to be used with python3.2!
>>>
>>> maybe somebody more skilled than me can make it run?
>>>
>>> here is the modified version:
>>> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip
>>>
>>> ingo
>>>
>>>
>>>
>>> Am 09.08.2011 um 18:18 schrieb Ingo Randolf:
>>>
>>>> hello.
>>>>
>>>> i want to use PIL with python 3.2.
>>>> Any ideas when PIL will be available for python32?
>>>>
>>>> thanks
>>>> ingo
>>>> _______________________________________________
>>>> Image-SIG maillist  -  [hidden email]
>>>> http://mail.python.org/mailman/listinfo/image-sig
>>>
>>> _______________________________________________
>>> Image-SIG maillist  -  [hidden email]
>>> http://mail.python.org/mailman/listinfo/image-sig
>>
>> _______________________________________________
>> Image-SIG maillist  -  [hidden email]
>> http://mail.python.org/mailman/listinfo/image-sig
>>
>>
> _______________________________________________
> Image-SIG maillist  -  [hidden email]
> http://mail.python.org/mailman/listinfo/image-sig

_______________________________________________
Image-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/image-sig
Loading...