Unable to install python packages from source

I need to install PIL(python image library) on my Ubunto10.4-32bit machine (EDIT: 64 bit) on my python2.5.4-32bit. This question also has relevance to any other source package I assume (among those that I need are RPyC, psycoand numpy).

I downloaded the source code since I cannot find any neat package to do the job and did a
sudo python2.5 setup.py install.
Output:

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    import glob, os, re, struct, string, sys
  File "/usr/lib/python2.5/struct.py", line 30, in <module>
    from _struct import Struct, error
ImportError: No module named _struct

but

echo $ PYTHONHOME   
/ USR

, struct.py from _struct import Struct, error python, , python, .
py2.5.4, :

./configure --prefix=/usr
make altinstall 

( make altinstall, py26 python )

EDIT: 64- :) 32- python2.5. - 32- python 2.6.

+5
3

:

Ubuntu. , easy_install. , .

Ubuntu ( apt-get)

Ubuntu (10.04 ) , apt-get. python-NAME, . python-imaging python-scipy.

, .

apt-cache search python | grep "^python-" | less, ( 1200 10.04).

Setuptools

, Ubuntu, python easy-install. :

sudo apt-get install python-setuptools

Python, . colorworld, easy-install:

sudo easy_install colorworld

(, ), , , .

- PYTHONPATH. , - .

+3
sudo aptitude install python-imaging

PIL.

+2
sudo aptitude install python-imaging

This will install PIL. But I'm not sure how to help with your other packages. Perhaps try to find them in synaptic mode.

0
source

All Articles