Problem Installing PIL (module search path problem I think) 
Author Message
 Problem Installing PIL (module search path problem I think)

Dumb question I'm sure, but I'm fairly stuck so here goes:

I'm trying to install the python Image Library (PIL) v1.0
Final on my system (mainly for the sake of using the vector
drawing program sketch).

I've successfully compiled PIL in Python-1.5.2/Imaging-1.0.
The installation instructions provided state that the module
must then be added to a location where Python can find the
PIL library.

I'm going to reproduce some of the install instructions here so
please humor the length of this post...

---8<----
[from within Python-1.5.2/Imaging-1.0/]
8. To build a dynamically loaded module, just type "make":

        $ make

   This will create a file called "_imaging.so".

   Then type (assuming a standard shell):

        $ PYTHONPATH=.:./PIL ; export PYTHONPATH
        $ python

        >>> import _imaging
        >>> import Image

   If both imports works, you've successfully added PIL to your Python
   environment.

9. Copy the "_imaging.so" module and the contents of the "Imaging/PIL"
   directory to a suitable place along the Python path.

   If you're using Python 1.5 or later, the preferred way is to create
   a "PIL" subdirectory under "site-packages", copy the "PIL.pth" file
   to "site-packages", and the rest of the files to the new      
   subdirectory.

   Example:

    $ cp PIL.pth /usr/local/lib/Python1.5/site-packages
    $ mkdir /usr/local/lib/Python1.5/site-packages/PIL
    $ cp _imaging.so PIL/* /usr/local/lib/Python1.5/site-packages/PIL

----8<----

Step 8 listed above works like a charm.  Step 9 is what is giving me
problems.  I couldn't find a Python-1.5.2/site-packages directory so
I created one and then followed the example commands in step 9 to
put PIL.pth and the _imaging.so library into Python-1.5.2/site-packages.
No luck there.

So I edited the PYTHONPATH environmental variable so that
"PYTHONPATH=.:/usr/local/src/Python-1.5.2/site-packages" but
I still had no luck verifying that "import _imaging" and "import
Image" would work as they did in installation step 8 above.

Any ideas?  I'm sure that this is a really simply thing and I'm
just not RTCFM (the "correct" manual case of an old favorite).

Thank you for your time,
Rhys Ulerich



Sun, 28 Apr 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Path problem with PIL installation

2. Problems installing PIL

3. Problems installing PIL on linux

4. Problem Installing PIL 1.0b1

5. Problems installing PIL

6. Problems installing PIL 1.1.3 on Windows 2000

7. Problem installing PIL 1.1.3

8. Newbie : Python install MIME type problem (I think)

9. Search path problem with GNAT 3.15p

10. PIL palette problem on PIL-1.1.2/Python-2.1/Solaris 2.8

11. Help - module path statement problem

12. IDLE module path problem

 

 
Powered by phpBB® Forum Software