在我的脚本中,我导入了 urrlib2 并且脚本运行良好。重新启动后,我收到以下错误:
File "demo.py", line 2, in <module>
import urllib2
File "/usr/lib/python2.6/urllib2.py", line 92, in <module>
import httplib
File "/usr/lib/python2.6/httplib.py", line 78, in <module>
import mimetools
File "/usr/lib/python2.6/mimetools.py", line 6, in <module>
import tempfile
File "/usr/lib/python2.6/tempfile.py", line 34, in <module>
from random import Random as _Random
ImportError: cannot import name Random
当我import random
单独做时,它工作正常。有什么想法可能是错的吗?
我正在使用 ubuntu 9.10(最新)。谢谢