Bad python package from Mandrake 9.1?

Oliver Egginger Oliver.Egginger at dvz.fh-giessen.de
Wed May 14 03:57:35 EDT 2003


Hello,

I'am working with Mandrake 9.1 with original Mandrake RPMs.
I did a religiously installation with all updates in it (uprmi).
The phyton version is 2.2.2.

I'am new to python but I have the suspicion that there
is something wrong with this mandrake python installation.
Maybe you can tell me whether this behaviour of python
is normal or not.


I have written two test scripts test.py and test2.py.


test.py:
-----------------------------------------
#! /usr/bin/python
import sys
import os
import getopt

os.execl('test2.py' , '');
-----------------------------------------


test2.py:
-----------------------------------------
#! /usr/bin/python

print "hello world!\n";
-----------------------------------------


When I call test.py from the commandline
test2.py gets invoked and I see the resulting
"hello world!" on stdout.
Everything seems to work normal.

But now I change the os.execl call in test.py to
  
    os.execl('/usr/bin/python' , 'test2.py');

When I call test.py now I get the following error messages:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
  
How could that be?

I run the two described versions of test.py with the -v option switched
on and write the corresponding import messages to two different files.
A diff of that files shows me that there where no differences  
(concerning the imports) between this two cases.

Can you tell me whats going wrong?
I think both versions should run or not?
The second version (which don't run under ML 9.1) is also the normal
case, I think.
(That is what I read in the docs about os.execl.)

Is the Mandrake package broken?
How can I set $PYTHONHOME?
Respectively how can I fix this?


- oliver


-- 
Oliver Egginger <Oliver.Egginger at dvz.fh-giessen.de>
Giessen-Friedberg University of Applied Sciences 
Wiesenstrasse 14
35390 Giessen
Tel. +49 641 309-1283
Fax  +49 641 309-1288







More information about the Python-list mailing list