Time Module

Tim Golden tim.golden at viacom-outdoor.co.uk
Mon Jul 12 08:49:35 EDT 2004


[.. re my request for more info diagnosing unable to import time ..]

| I've done what you asked:
| 
| joequimby.st-and.ac.uk> python -v
| # /usr/local/lib/python2.2/site.pyc has bad mtime
| import site # from /usr/local/lib/python2.2/site.py
| # can't create /usr/local/lib/python2.2/site.pyc
| # /usr/local/lib/python2.2/os.pyc has bad mtime
| import os # from /usr/local/lib/python2.2/os.py
| # can't create /usr/local/lib/python2.2/os.pyc
| import posix # builtin
| # /usr/local/lib/python2.2/posixpath.pyc has bad mtime
| import posixpath # from /usr/local/lib/python2.2/posixpath.py
| # can't create /usr/local/lib/python2.2/posixpath.pyc
| # /usr/local/lib/python2.2/stat.pyc has bad mtime
| import stat # from /usr/local/lib/python2.2/stat.py
| # can't create /usr/local/lib/python2.2/stat.pyc
| # /usr/local/lib/python2.2/UserDict.pyc has bad mtime
| import UserDict # from /usr/local/lib/python2.2/UserDict.py
| # can't create /usr/local/lib/python2.2/UserDict.pyc
| # /usr/local/lib/python2.2/copy_reg.pyc has bad mtime
| import copy_reg # from /usr/local/lib/python2.2/copy_reg.py
| # can't create /usr/local/lib/python2.2/copy_reg.pyc
| # /usr/local/lib/python2.2/types.pyc has bad mtime
| import types # from /usr/local/lib/python2.2/types.py
| # can't create /usr/local/lib/python2.2/types.pyc
| # /usr/local/lib/python2.2/__future__.pyc has bad mtime
| import __future__ # from /usr/local/lib/python2.2/__future__.py
| # can't create /usr/local/lib/python2.2/__future__.pyc
| Python 2.2.1 (#1, May 28 2002, 13:48:16) 
| [GCC 3.0.4] 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
| >>> 
| 

Thanks, Alex. First of all, keep posting to the Python mailing-list /
comp.lang.python (they mirror each other; I can't tell which you're
coming through). The more people see your symptoms, the more likely
you are to find someone who's seen it before or who can tell what's
wrong.

I've never seen something like this myself. It's curious enough that
the .pyc files have bad mtimes, but hardly fatal. .pyc files are
compiled copies of their respective .py files, but Python works fine
without them. I can't imagine what could cause time not to import.
I bet there's no configure option to exclude the module from the
build, so presumably one of the previous errors has caused enough
of a problem to prevent time from being available. Try doing 
"import sys" (which is also a built-in module).

But really, I've nothing to offer except to confirm that it's
weird. You'll have to hope that someone knowledgeable is
watching the list.

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list