Alright, it looks like it is working now. Here is what I did to rebuild
and re-install PIL from scratch:
# rm -rf /usr/local/lib/python2.7/site-packages/PIL*
# rm -rf /src/Imaging-1.1.7
# cd /src
# tar -xvzf Imaging-1.1.7.tar.gz
# cd Imaging-1.1.7
# python2.7 setup.py build_ext -i
# python2.7 selftest.py
# python2.7
>>> import _imaging
>>> [(k, v) for k, v in vars(_imaging).items() if k[0] == 'z']
#Confirmed that the zip decoder libs were there
# python2.7 setup.py install
In trying to retrace my steps to figure out where I went wrong, I think
I used the "simple" install method listed at the top of the README (0.
If you're in a hurry...) first. All the supporting libraries were in
place in their standard locations so I figured I was safe for the simple
install. Note to self...) ;)
Anyway, i remember that this failed to find 3/5 libraries. It appears
that the build process does not check /usr/lib64 by default (which is
one of the default locations for libraries on a Linux x64 system. So, I
updated setup.py with the necessary paths to the libs.
I believe I then tried a "setup.py clean" command to reset the build
directories... Something along those lines. In any case, it appears I
did not get the original failed install out of the system when I thought
I had and that is what was tripping me up all along.
Thank you very much for your help! My script is chugging away now. :)
Enjoy the weekend!
-Adam
On 1/7/2011 8:54 PM, Fredrik Lundh wrote:
Oh, I just noticed that your mail included the "SETUP SUMMARY" but not
the selftest summary. Did you install the missing libraries after an
initial failed build? It could be that distutils didn't rebuild the
necessary files for you...
For a quick sanity check, in your build directory, do:
$ ls -l build/*/libImaging/*.o
and check that the ZipEncode and ZipDecode object files aren't
suspiciously tiny compared to the rest of the modules (they're still
built if zip support is disabled, but are mostly empty in that case).
If this seems to be the case, or if you just want to be sure, nuke the
build directory and run setup again. You can use build_ext -i to
build just the extensions in the current directory:
$ rm -rf build
$ python2.7 setup.py build_ext -i
$ python2.7
import _imaging
dir(_imaging)
... look for zip functions ... or do:
[(k, v) for k, v in vars(_imaging).items() if k[0] == 'z']
[('zip_decoder',<built-in function zip_decoder>), ('zlib_version',
'1.2.3.3'), ('zip_encoder',<built-in function zip_encoder>)]
If your result matches the sample output above, run setup.py install
and make sure that the _imaging.so module installed under
site-packages matches the one that was built locally.
</F>
2011/1/8 Adam M. Johnson<[email protected]>:
Thank you for the troubleshooting technique! I am still getting oriented
with Python. Sadly, this did not reveal anything telling. I ran this command
as root and as the user who will be running it. I ran from the Imaging build
directory, from the directory in which the script is located and from the
user's home directory. All came back with the same path to the library file:
/usr/local/lib/python2.7/site-packages/PIL/_imaging.so
This is what I would expect when things are working correctly.
Is there anything else I can check?
Thanks for your help.
Adam
On 1/7/2011 3:33 PM, Fredrik Lundh wrote:
python -c "import _imaging; print _imaging.__file__"
_______________________________________________
Image-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/image-sig