Can import time module as root but not as normal user

Darren Watson darren at netscripter.org
Sat May 11 07:12:40 EDT 2002


Hi

I have installed Python 2.2.1 on SuSE Linux 7.1 from source code version of 
Python.  I can import the time module when logged in as root, but not when 
any other user.

When a normal user tried to import the module the error below appears:

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

The values of sys.path are as below:

for root:
['', '/usr/local/lib/python2.2', '/usr/local/lib/python2.2/plat-linux2', 
'/usr/local/lib/python2.2/lib-tk', '/usr/local/lib/python2.2/lib-dynload', 
'/usr/local/lib/python2.2/site-packages']

for any other user:
['', '/usr/local/lib/python2.2', '/usr/local/lib/python2.2/plat-linux2', 
'/usr/local/lib/python2.2/lib-tk', '/usr/local/lib/python2.2/lib-dynload', 
'/usr/local/lib/python2.2/site-packages']

Has anyone had this problem before and found a solution?

Many thanks for any help

-- 

Darren Watson



More information about the Python-list mailing list