Hi Robert - I understand your frustration installing PIL. I have been trying off and on for a couple months. The Pythonware site since March has said the Windows binary will be posted 'later this month'. I requested an installer from the Image group and the file I received hangs at the point that the installer wants the Python path identified. Per the readme, the source files on Pythonware reportedly require a C+ or VB compiler that I do not have access to. I have followed the threads in this group and as best I can tell, people are installing an older Zope (2.3.3) to use the older binaries and some have been dropping the incremental patches and revisions over time as the development programmers announce them. No one has shared their log of what files were added in what order. I, too, don't know how to do a new Win32 setup of Zope2.5.1 and its included Python release and have PIL available to Zope. I have no clue how to determine where Python sets its path to know what directories are in it and to add the PIL directory to it. It would be great if someone could post a how-to readable by newbies that specifically linked to the current versions of all needed files instead of another endless search of 'somewhere in the sourceforge site'. I inquired once with Python Labs and their response is 'buy a support package' for $2K and we'll point you to the latest files. Until I can demo this stuff, I can't get a client to finance 'an interesting technology'. I wish I could help. Its extremely frustrating. If I get more clues, I will certainly share them with you. Regards, Gary ----- Original Message ----- From: "Lennart Regebro" <lennart@torped.se> To: <rmccain@gvpi.com>; <image-sig@python.org> Sent: Thursday, June 27, 2002 9:53 AM Subject: Re: [Image-SIG] Installing PIL
From: <rmccain@gvpi.com> I for some reason cannot seem to install the python Image Library on my computer. I have tried every solution that I have seen or could think of with no luck. Well I can actually get the PIL to install and import, its just that when I try to work on an image I get the error that the python imaging c library is not installed. I tried importing this library with no luck. I put this under the dll directory, in just about every PIL directory and no luck. I really need some help on this one. Maybe the exe distribution will help me as that is the only version I could ever get to work on my computer. I am currently running python 2.2, on a windows 98 os. Please let me know if you have any solutions to my problem.
Thanks, -Robert M. McCain
You should use the windows download (make sure you have the one for Python 2). Place the DLL files somewhere in the python path, and place the PIL directory in the same place.
That should be all.
Best Regards
Lennart Regebro Torped Strategi och Kommunikation AB
It would be great if someone could post a how-to readable by newbies that specifically linked to the current versions of all needed files instead of another endless search of 'somewhere in the sourceforge site'.
OK, here's my solution. So far, this seems to have worked fine (i.e. I can run the thumbnailer script below without a problem). I didn't actually have any problems with PIL so far other than finding that I needed to install the Tcl DLLs mentioned below... I have... - Windows 2000 Server SP2 (in case it matters) - Zope 2.5.1 (just the regular downloaded binary) installed on it. - Another machine with a regular install of Python. Could be the same machine as the server, I guess - but I used my workstation. - PIL from Pythonware. The link is "Python Imaging Library 1.1.2 for Python 2.1.1" and the file is called "py21-pil-1.1.2-20010910.exe" Install the downloaded PIL on the other machine and you'll get some files in C:\py21. Put the _imaging.pyd file from C:\py21\DLLs into Zope\bin\lib\win32. You don't need the _imagingtk.pyd file because Zope doesn't do Tk stuff. You need to copy the tcl83.dll and tk83.dll files from the regular install of Python into Zope\bin\lib\win32. If you don't do this, the server throws DLL errors on the console. I have no idea why it needs the Tk DLL, but it does! Put the entire PIL directory in Zope\lib\python. Restart your Zope and then try something out. I used a thumbnailer script from a recipe at ZopeLabs, installed in the Extensions folder and referenced with an External Method: --------------------------------- import PIL.Image import cStringIO def make_thumb(self, image, width, height): """ make a thumbnail from a Zope image """ oriImage = self.restrictedTraverse(image) oriFile = cStringIO.StringIO(oriImage.data) image = PIL.Image.open(oriFile) image.thumbnail((int(width), int(height))) image_type = image.format thumbnailImage = cStringIO.StringIO() image.save(thumbnailImage, image_type) thumbnailImage.seek(0) return thumbnailImage.getvalue() --------------------------------- Let me know if it works or if I just got lucky. Oh, the only credit I take for this is adding the Tcl and Tk dlls, everything else I found on assorted mailing list archives somewhere (I forget now). Cheers, Julian. ___________ Julian Melville Select Australasia mailto:jmelville@selectaustralasia.com.au http://www.selectaustralasia.com.au/
participants (2)
-
Gary Speer -
Julian Melville