Can import time module as root but not as normal user

John La Rooy larooy at xtar.co.nz
Sat May 11 07:30:55 EDT 2002


try running python -v
you'll get a message like 

>>>import time
import time # dynamically loaded from /usr/local/lib/python2.2/lib-dynload/time.so

check the permissions on that file and the directories

John

On Sat, 11 May 2002 12:12:40 +0100
Darren Watson <darren at netscripter.org> wrote:

> 
> 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