Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python2.2 installation error in SuSE 10.0

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am trying to compile and install Python2.2.3 in SuSE 10.0, and although compilation and installation works fine, when i run python in interactive mode, i get the following:

Code:
host1:~ # /usr/local/bin/python
Python 2.2.3 (#1, Feb  8 2006, 15:28:23)
[GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/etc/pythonstart", line 7, in ?
    import readline
ImportError: No module named readline
>>>
Does anyone know how i can get around this?

Thanks in advance :)

fishsponge
 
ok, i have more information!

It appears that readline is not being compiled along with python, during the make/make install routine, because i don't think it can find the readline stuff, even though i have installed the devel packages, and the old compat packages.

In the configure script with Python2.2.3, it checks for various versions of readline. Here are the comments from the top of each section:

Code:
# check for readline 2.2
# check for readline 4.0
# check for readline 4.2
The default version of readline with SuSE 10 is 5.0. The compat package contains version 4.3.

Therefore, i guess the python configure script simply isn't find it, and is therefore not compiling it along with the rest of python.

I then tried downloading ftp://ftp.gnu.org/gnu/readline/readline-4.2a.tar.gz but it won't compile on my system because of something i forgot to mention - this is a 64-bit system. The error i receive is:

Code:
host1:~/ # ./configure --prefix=/usr/local
checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
configure: error: /bin/sh ./support/config.sub x86_64-unknown-linux-gnu failed.
host1:~/ #
Does anyone know how i can get Python2.2.3 and the readline module working on a 64-bit SuSE 10 system??

Thanks again people, any help is greatly appreciated :)

fishsponge
 
So, your problem is not with Python so much as you can't compile readline on your system. Have you tried installing the readline development RPMs from SuSE?
 
ah yes, good point... now the problem has changed, i'm kinda in the wrong forum! lol

i have tried searching for old readline rpms that will work on SuSE 10, but i'm not having much luck. I guess there's not much call for readline 4.2 on 64-bit SuSE 10! lol

I'll keep searching, and any future problems that aren't related to python, will be posted elsewhere :)

Cheers!!

fishsponge
 
Why are you trying to install such an old version of python? Is there something in particular that you need from it? We may be able to help you use a more recent version if there is.
 
i'm trying to install python2.2 because the people who use the machines i support need to have access to this legacy version for loads of old scripts that cannot be migrated to later versions due to time constraints.

And yes - the problem does appear to be readline itself, as opposed to python. Basically, the old python version requires an old readline version, and the old readline version doesn't recognise the new SuSE linux 64-bit architecture! Nightmare! lol

So... any suggestions on how to compile readline 4.2 under 64-bit SuSE 10 ??

fishsponge
 
Pretty much the same as for any package...

Download the source
untar it
cd to the directory
./configure ; make ; make install
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top