Some issue with easy_install and PIL/Imaging

Klein Stéphane stephane at harobed.org
Wed Sep 9 14:15:42 CEST 2009


Hi,

I would like to insert Imaging dependence in my setup.py file.

Resume :
1. first question : why PIL package in "pypi" don't work ?
2. second question : when I add PIL dependence in my setup.py and I do
    "python setup.py develop", I've this error :
    "error: Could not find required distribution Imaging".
    Why ?


Full explication :

First, I test manualy installation :

::

     (env1)sklein at eee-sklein:$ easy_install pil
     Searching for pil
     Reading http://pypi.python.org/simple/pil/
     Reading http://www.pythonware.com/products/pil
     Reading http://effbot.org/zone/pil-changes-115.htm
     Reading http://effbot.org/downloads/#Imaging
     No local packages or download links found for pil
     error: Could not find suitable distribution for 
Requirement.parse('pil')

This command fail !

Now, I try with Imaging package name :

::

     (env1)sklein at eee-sklein:$ easy_install Imaging
     Searching for Imaging
     Reading http://pypi.python.org/simple/Imaging/
     Couldn't find index page for 'Imaging' (maybe misspelled?)
     Scanning index of all packages (this may take a while)
     Reading http://pypi.python.org/simple/
     No local packages or download links found for Imaging
     error: Could not find suitable distribution for 
Requirement.parse('Imaging')

This command fail also.

Now, I add --find-links parameter to easy_install :

::

     (env1)sklein at eee-sklein:$ easy_install --find-links 
http://www.pythonware.com/products/pil/ Imaging
     Searching for Imaging
     Reading http://www.pythonware.com/products/pil/
     Best match: Imaging 1.1.6
     Downloading http://effbot.org/downloads/Imaging-1.1.6.tar.gz
     Processing Imaging-1.1.6.tar.gz
     Running Imaging-1.1.6/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-rF1PG1/Imaging-1.1.6/egg-dist-tmp-Xtv8GV
     libImaging/Effects.c:210: attention : ‘perlin_init’ defined but not 
used
     libImaging/File.c: In function ‘ImagingOpenPPM’:
     libImaging/File.c:112: attention : ignoring return value of 
‘fread’, declared with attribute warn_unused_result
     libImaging/File.c:119: attention : ignoring return value of 
‘fread’, declared with attribute warn_unused_result
     libImaging/Geometry.c:236: attention : ‘quadratic_transform’ 
defined but not used
     libImaging/Quant.c:311: attention : ‘test_sorted’ defined but not used
     libImaging/Quant.c:676: attention : ‘checkContained’ defined but 
not used
     libImaging/QuantHash.c:136: attention : ‘_hashtable_test’ defined 
but not used
     --------------------------------------------------------------------
     PIL 1.1.6 BUILD SUMMARY
     --------------------------------------------------------------------
     version       1.1.6
     platform      linux2 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
                   [GCC 4.3.3]
     --------------------------------------------------------------------
     *** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
     --- JPEG support ok
     --- ZLIB (PNG/ZIP) support ok
     --- FREETYPE2 support ok
     --------------------------------------------------------------------
     To add a missing option, make sure you have the required
     library, and set the corresponding ROOT variable in the
     setup.py script.

     To check the build, run the selftest.py script.
     zip_safe flag not set; analyzing archive contents...
     Image: module references __file__
     Adding PIL 1.1.6 to easy-install.pth file
     Installing pilprint.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pilfile.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pilconvert.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pilfont.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pildriver.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin

     Installed 
/home/sklein/tests/test_eggs_pil/env1/lib/python2.6/site-packages/PIL-1.1.6-py2.6-linux-i686.egg
     Skipping dependencies for PIL 1.1.6

This command work very well.

First question : why PIL package in "pypi" don't work ?

Now, I remove PIL in my virtualenv to test setup.py installation :

::

     (env1)sklein at eee-sklein:$ rm 
/home/sklein/tests/test_eggs_pil/env1/lib/python2.6/site-packages/PIL-1.1.6-py2.6-linux-i686.egg/ 
-rf

     (env1)sklein at eee-sklein:$ cat setup.py
     from setuptools import setup, find_packages
     import sys, os

     version = '0.0'

     setup(name='test_pil',
           version=version,
           description="",
           long_description="""\
     """,
           classifiers=[], # Get strings from 
http://pypi.python.org/pypi?%3Aaction=list_classifiers
           keywords='',
           author='',
           author_email='',
           url='',
           license='',
           packages=find_packages(exclude=['ez_setup', 'examples', 
'tests']),
           include_package_data=True,
           zip_safe=False,
           dependency_links=['http://www.pythonware.com/products/pil/'],
           install_requires=[
               # -*- Extra requirements: -*-
               'Imaging'
           ],
           entry_points="""
           # -*- Entry points: -*-
           """,
           )

     (env1)sklein at eee-sklein:$ python setup.py develop
     running develop
     running egg_info
     writing requirements to test_pil.egg-info/requires.txt
     writing test_pil.egg-info/PKG-INFO
     writing top-level names to test_pil.egg-info/top_level.txt
     writing dependency_links to test_pil.egg-info/dependency_links.txt
     writing entry points to test_pil.egg-info/entry_points.txt
     reading manifest file 'test_pil.egg-info/SOURCES.txt'
     writing manifest file 'test_pil.egg-info/SOURCES.txt'
     running build_ext
     Creating 
/home/sklein/tests/test_eggs_pil/env1/lib/python2.6/site-packages/test-pil.egg-link 
(link to .)
     test-pil 0.0dev is already the active version in easy-install.pth

     Installed /home/sklein/tests/test_eggs_pil/test_pil
     Processing dependencies for test-pil==0.0dev
     Searching for Imaging
     Reading http://www.pythonware.com/products/pil/
     Best match: Imaging 1.1.6
     Downloading http://effbot.org/downloads/Imaging-1.1.6.tar.gz
     Processing Imaging-1.1.6.tar.gz
     Running Imaging-1.1.6/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-OpIvPF/Imaging-1.1.6/egg-dist-tmp-uNmpa5
     libImaging/Effects.c:210: attention : ‘perlin_init’ defined but not 
used
     libImaging/File.c: In function ‘ImagingOpenPPM’:
     libImaging/File.c:112: attention : ignoring return value of 
‘fread’, declared with attribute warn_unused_result
     libImaging/File.c:119: attention : ignoring return value of 
‘fread’, declared with attribute warn_unused_result
     libImaging/Geometry.c:236: attention : ‘quadratic_transform’ 
defined but not used
     libImaging/Quant.c:311: attention : ‘test_sorted’ defined but not used
     libImaging/Quant.c:676: attention : ‘checkContained’ defined but 
not used
     libImaging/QuantHash.c:136: attention : ‘_hashtable_test’ defined 
but not used
     --------------------------------------------------------------------
     PIL 1.1.6 BUILD SUMMARY
     --------------------------------------------------------------------
     version       1.1.6
     platform      linux2 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
                   [GCC 4.3.3]
     --------------------------------------------------------------------
     *** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
     --- JPEG support ok
     --- ZLIB (PNG/ZIP) support ok
     --- FREETYPE2 support ok
     --------------------------------------------------------------------
     To add a missing option, make sure you have the required
     library, and set the corresponding ROOT variable in the
     setup.py script.

     To check the build, run the selftest.py script.
     zip_safe flag not set; analyzing archive contents...
     Image: module references __file__
     Adding PIL 1.1.6 to easy-install.pth file
     Installing pilprint.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pilfile.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pilconvert.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pilfont.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin
     Installing pildriver.py script to 
/home/sklein/tests/test_eggs_pil/env1/bin

     Installed 
/home/sklein/tests/test_eggs_pil/env1/lib/python2.6/site-packages/PIL-1.1.6-py2.6-linux-i686.egg
     error: Could not find required distribution Imaging

This commend work but I have this error : "error: Could not find 
required distribution Imaging". Why ?

Thanks for your help,
Stephane




More information about the Python-list mailing list