473,795 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4113
pe**********@ta lk21.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
1703
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 python2.3 all the rpms/sources work for python 2.2
54
3987
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 but *NOT* mystring (5th element). Many people don't like idea that 5th element is not invited. (BTW, yes I'm aware of the explanation where slicing
3
2596
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 apparently can't write XPMs. GTK will only take XPMs, that I can see. Therein lies the rub. I can ship over monochrome bitmaps via XBM, but I'd rather be able to ship over full color. (Use case, in case it matters: I am trying to embed a graphic into a...
1
5822
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' attribute which returns an object of type 'ImagePalette'. However, the documentation is a bit lacking regarding how to maniuplate the ImagePalette class to retrieve the palette entries' RGB values. Can anyone point me to a short example? Thanks!
0
1384
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 is OK. However when I run "path/to/python selftest.py" from the same package, I get an IOError: decoder jpg not available. This is a RHEL4 server and I am building PIL for a selfcompiled Python
1
1193
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
2741
by: moishyyehuda | last post by:
can I download Python Imaging Library (PIL) for linux.
1
5006
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 build/temp.linux-i686-2.4/libImaging gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,- D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer- size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -
6
1792
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 and type python, it brings up version 2.3.5. If I type IDLE it brings up version 2.4.4.
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.