473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Unable to install Python Imaging Library

A few weeks ago I asked for advice about which GUI toolkit I should
learn, and receved several helpful answers. In the end I went with
Tkinter. This was because a) it was already installed on the machines
I am most likley to use, b) it is cross platform, and c) it was not as
complex as PyGtk - which I tried and was totally unable to decipher.

I am now at the point of trying to import the Python Imaging Library,
and I have reached a total standstill. I downloaded a copy of Python
Imaging Library 1.1.5 Source Kit from the site
http://www.pythonware.com/products/pil/. There did not seem to be any
prebuilt binaries suitable for my system (Python 2.2/Fedora Core 1), so
I loaded the source code.

The instructions said to try 'python setup.py install', followed by
more detailed instructions 'If you prefer to know what you're doing'. I
do prefer to know what I'm doing, but couldn't understand the following
instructions. So I tried the simple route, but it failed with the
output shown below.

I have absolutely no idea how to proceed. Can anyone point me in the
right direction to get over this hurdle?
gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC
-fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include
-I/usr/local/include -I/usr/include/python2.2 -c _imagingtk.c -o
build/temp.linux-i686-2.2/_imagingtk.o
_imagingtk.c:20:16: tk.h: No such file or directory
_imagingtk.c:23: error: syntax error before '*' token
_imagingtk.c:31: error: syntax error before "Tcl_Interp"
_imagingtk.c:31: warning: no semicolon at end of struct or union
_imagingtk.c:32: warning: data definition has no type or storage class
_imagingtk.c: In function `_tkinit':
_imagingtk.c:37: error: `Tcl_Interp' undeclared (first use in this
function)
_imagingtk.c:37: error: (Each undeclared identifier is reported only
once
_imagingtk.c:37: error: for each function it appears in.)
_imagingtk.c:37: error: `interp' undeclared (first use in this
function)
_imagingtk.c:45: error: syntax error before ')' token
_imagingtk.c:50: error: `app' undeclared (first use in this function)
_imagingtk.c:50: error: syntax error before ')' token
_imagingtk.c: At top level:
_imagingtk.c:55: warning: parameter names (without types) in function
declaration
_imagingtk.c:55: error: conflicting types for `TkImaging_Init'
_imagingtk.c:23: error: previous declaration of `TkImaging_Init'
_imagingtk.c:55: warning: data definition has no type or storage class
_imagingtk.c:57: error: syntax error before '&' token
error: command 'gcc' failed with exit status 1

Dec 18 '05 #1
2 4086
pe**********@talk21.com wrote:
I have absolutely no idea how to proceed. Can anyone point me in the
right direction to get over this hurdle?
gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC
-fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include
-I/usr/local/include -I/usr/include/python2.2 -c _imagingtk.c -o
build/temp.linux-i686-2.2/_imagingtk.o
_imagingtk.c:20:16: tk.h: No such file or directory


the setup procedure has determined that your Python has been built with
Tkinter, and that Tcl/Tk libraries and include files seem to be available, but
the compiler cannot find them, for some unknown reason.

have you tried installing the Tcl and Tk development libraries ? (usually
tcl-devel and tk-devel)

if you have, look for lines similar to the following

--- using Tcl/Tk libraries at /usr/local
--- using Tcl/Tk version 8.4

in the output from the setup script, and make sure that you have the Tcl/Tk
libraries and include files at that location (look in the lib and include directories).

</F>

Dec 18 '05 #2
Thanks for that reply.

I hadn't tried installing the Tcl and Tk development libraries -
because I had no idea these that these were necessary (or that they
even existed!). My first attempt to do so was a total failure, as I
downloaded the RPM files from http://rpmfind.net, but immediately
entered a dependency hell. My next attempt was a little more thought
out - I looked for the appropriate files on some Fedora Core 1
distribution discs, and to my surprise found them. To my even greater
surprise, I could load these without problems and then the PIL install
ran smoothly.

So thanks to your hint I have got there. Much appreciated.

Peter

Dec 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mir nazim | last post by:
hi, i cannot find sum() built in fuction in 2.3 version. i built from sources python from python.org. it gives NameError. please tell me where can i find Python Imaging Library libxml2 for...
54
by: seberino | last post by:
Many people I know ask why Python does slicing the way it does..... Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring gives me elements 0, 1, 2 and 3...
3
by: Jeremy Bowers | last post by:
I have an image in the Python Image Library. I'm trying to get it into PyGTK in color. Is there any way to do this cross-platform, preferably without writing to anything to the disk? PIL...
1
by: Stuart | last post by:
I am using the Python Imaging Library (PIL) to process GIF images. I need to be able to retrieve the RGB values for each color palette entry. I see that the 'Image' class has a 'palette'...
0
by: mikko.koivunen | last post by:
Hello all, I am installing the Python Imaging Library (1.1.5). Following the README that came with PIL sources, I ran "path/to/python setup.py build_ext -i" which informed me that JPEG support...
1
by: srj | last post by:
hi can any1 tell me which is a good imaging lib in python and where i can get it (2 dwnld) from?? regds
2
by: moishyyehuda | last post by:
can I download Python Imaging Library (PIL) for linux.
1
by: Frank Potter | last post by:
I use "python setup.py install" to install PIL in fedora with python 2.4, But I got these errors: running build_ext building '_imaging' extension creating build/temp.linux-i686-2.4 creating...
6
by: John Fisher | last post by:
Hi Groupies, I have an Intel Macbook running OS X 10.4. It came installed with Python 2.3.5. I have since installed MacPython with version 2.4.4, cool. When I open a bash terminal session...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.