Reputation: 273
I have a problem when trying to import the time module in python3.
Can someone give me some hints? I searched in the standard documentation and it says it should be always available.
The error I get is:
>>>import time
ImportError: No module named 'time'
Upvotes: 2
Views: 2239
Reputation: 85372
time
is a compiled shared object module. For example,
>>> import time
>>> time
<module 'time' from '/opt/ActivePython-2.7/lib/python2.7/lib-dynload/time.so'>
These shared object modules live under a specific directory (lib-dynload
in the above case), which directory may not be in your $PYTHONPATH.
Upvotes: 2