Library load err with --prefix build 1.5.2

Scott RoLanD shr at chat.net
Sun Jun 6 15:26:51 EDT 1999


I just did a virgin Mandrake 6.0 install (which comes with Python
1.5.1) and I want to compile and install 1.5.2 in:
  /home/shr/python
I want to leave the original 1.5.1 RPM right where it is and have my
new 1.5.2 install function in place without any problems.

However, it seems that if the 1.5.1 version is at the head of my PATH,
then I have problems using the 1.5.2 version.

I built as follows:
  ./configure --prefix=/home/shr/python
  make
  make test (test_long failed; test_types crashed)
  make install

So now I have a binary at:
  /home/shr/python/bin/python

But the problem comes when I try to use this simple script 'example':
####################
%: unset PYTHONPATH
%: which python
/usr/bin/python

%: python
Python 1.5.1 (#1, Apr 13 1999, 03:12:59)  [GCC pgcc-2.91.60 19981201 (e on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 

%: cat example
#!/home/shr/python/bin/python
import sys
print sys.path

%: ./example
Built-in exception class not found: EnvironmentError.  Library mismatch?
Warning!  Falling back to string-based exceptions
['.', '/usr/lib/python1.5/', '/usr/lib/python1.5/plat-linux2', '/usr/lib/python1.5/lib-tk', '/usr/lib/python1.5/lib-dynload']

%: /home/shr/python/bin/python example
['', '/home/shr/python/lib/python1.5/', '/home/shr/python/lib/python1.5/plat-linux2', '/home/shr/python/lib/python1.5/lib-tk', '/home/shr/python/lib/python1.5/lib-dynload']

%: PATH=/home/shr/python/bin:$PATH
%: which python
/home/shr/python/bin/python

%: python
Python 1.5.2 (#1, Jun  6 1999, 15:06:23)  [GCC pgcc-2.91.66 19990314 (egcs-1.1.2  on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 

%: ./example
['.', '/home/shr/python/lib/python1.5/', '/home/shr/python/lib/python1.5/plat-linux2', '/home/shr/python/lib/python1.5/lib-tk', '/home/shr/python/lib/python1.5/lib-dynload']

%: /usr/bin/python example
['', '/usr/lib/python1.5/', '/usr/lib/python1.5/test', '/usr/lib/python1.5/plat-linux-i386', '/usr/lib/python1.5/lib-tk', '/usr/lib/python1.5/lib-dynload']
####################

I don't want to have to set PYTHONPATH in order to get this to
work. Anyone with a vanilla environment should be able to use this
script.

This should work; what is going on?
Thanks In Advance.
-- 
Scott RoLanD
http://www.chat.net/~shr/




More information about the Python-list mailing list