[ python-Bugs-1321736 ] Missing Library Modules

SourceForge.net noreply at sourceforge.net
Tue Oct 11 17:10:04 CEST 2005


Bugs item #1321736, was opened at 2005-10-09 21:17
Message generated for change (Comment added) made by georgel377
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1321736&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: George LeCompte (georgel377)
Assigned to: Nobody/Anonymous (nobody)
Summary: Missing Library Modules

Initial Comment:
downloaded python-2.4.2 under redhat Linux 9

python


>>> import time
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named time
>>> import math
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named math
>>>


Haven't checked many more  modules

didn't notice any errors in ./config, make, or make
install.



----------------------------------------------------------------------

>Comment By: George LeCompte (georgel377)
Date: 2005-10-11 08:10

Message:
Logged In: YES 
user_id=1187496

ran strace and the source was staring at me in two
uncorrelated places;

1)
PYTHONPATH 
.:/usr/local/lib/python2.4/:/usr/local/lib/python2.4/site-packages/
2)
[root at localhost Python-2.4.2]# find / -name 'time.so'
/usr/local/lib/python2.4/lib-dynload/time.so

appending '/usr/local/lib/python2.4/lib-dynload' resolved
the problem

thanks for the hint

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-10 20:16

Message:
Logged In: YES 
user_id=33168

The files (time.so, math.so) look like they are installed
where they should be.  What is your LD_LIBRARY_PATH?  Does
it work as a normal user (not root)?  ls -l
/usr/local/lib/python2.4/lib-dynload/math.so ?

Finally, this is the most likely to help you resolve the
problem, run strace.  strace will show where python is
trying to load math.so and should indicate what error is
occurring.  Hopefully, that will point out the real problem.

----------------------------------------------------------------------

Comment By: George LeCompte (georgel377)
Date: 2005-10-10 16:15

Message:
Logged In: YES 
user_id=1187496

I did a make clean, ./configure, make, and make install with
no improvements. 

Here is the contnts of  the file previously attached.  I
think it answers the questions.

.:/usr/local/lib/python2.4/:/usr/local/lib/python2.4/site-packages/
PYTHON PATH seems OK

[root at localhost Python-2.4.2]# echo $PYTHONPATH
.:/usr/local/lib/python2.4/:/usr/local/lib/python2.4/site-packages/
[root at localhost Python-2.4.2]#



There were some warning during make:

[root at localhost Python-2.4.2]# make >makeInfo
libpython2.4.a(posixmodule.o)(.text+0x39e0): In function
`posix_tmpnam':
Modules/posixmodule.c:6159: the use of `tmpnam_r' is
dangerous, better use `mkstemp'
libpython2.4.a(posixmodule.o)(.text+0x3952): In function
`posix_tempnam':
Modules/posixmodule.c:6114: the use of `tempnam' is
dangerous, better use `mkstemp'
/home/george/downloads/Python/Python-2.4.2/Modules/cjkcodecs/_codecs_iso2022.c:
In function `iso2022_encode':
/home/george/downloads/Python/Python-2.4.2/Modules/cjkcodecs/_codecs_iso2022.c:207:
warning: passing arg 1 of pointer to function from
incompatible pointer type[root at localhost Python-2.4.2]#

time.so and math.so exist under build/lib*2.4

[root at localhost Python-2.4.2]# find / -name 'math.so'
/usr/local/lib/python2.4/lib-dynload/math.so
/usr/src/redhat/BUILD/Python-2.3.4/build/lib.linux-i686-2.3/math.so
/home/george/.kde/share/usr/local/lib/python2.4/lib-dynload/math.so
/home/george/downloads/Python/Python-2.4.2/build/lib.linux-i686-2.4/math.so

[root at localhost Python-2.4.2]# find / -name 'time.so'
/usr/local/lib/python2.4/lib-dynload/time.so
/usr/src/redhat/BUILD/Python-2.3.4/build/lib.linux-i686-2.3/time.so
/home/george/.kde/share/usr/local/lib/python2.4/lib-dynload/time.so
/home/george/downloads/Python/Python-2.4.2/build/lib.linux-i686-2.4/time.so
[root at localhost Python-2.4.2]#

The problem still persists:

[root at localhost Python-2.4.2]#
[root at localhost Python-2.4.2]# python
Python 2.4.2 (#5, Oct 10 2005, 07:52:32)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import time
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named time
>>> import math
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named math
>>> import sys
>>> import datetime
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named datetime
>>> import rand
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named rand
>>>



----------------------------------------------------------------------

Comment By: George LeCompte (georgel377)
Date: 2005-10-10 09:05

Message:
Logged In: YES 
user_id=1187496

Attached a file with edited log  showing problem.

george

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-09 22:16

Message:
Logged In: YES 
user_id=33168

Can you re-run make and see if there are errors?  Is there
anything in your PYTHONPATH environment variable?  We will
need more information in order to attempt to debug this.

Do the .so files exist under build/lib*2.4/ ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1321736&group_id=5470


More information about the Python-bugs-list mailing list