Python 2.5.4 ImportError:没有名为collections的模块

时间:2012-07-12 16:12:41

标签: python

我对Python很新,我不明白这里发生了什么。

C:\Users\Mike\Desktop>storytext testGui.py
Traceback (most recent call last):
  File "C:\Python25\Scripts\storytext.py", line 19, in <module>
    from storytext.cmdline import main
  File "C:\Python25\lib\site-packages\storytext-3.7-py2.5.egg\storytext\cmdline.py", line 3, in <module>
    import scriptengine, definitions
  File "C:\Python25\lib\site-packages\storytext-3.7-py2.5.egg\storytext\scriptengine.py", line 4, in
 <module>
    import recorder, replayer
  File "C:\Python25\lib\site-packages\storytext-3.7-py2.5.egg\storytext\recorder.py", line 6, in <module>
    from replayer import ReplayScript
  File "C:\Python25\lib\site-packages\storytext-3.7-py2.5.egg\storytext\replayer.py", line 5, in <module>
    from threading import Thread, Timer
  File "C:\Python25\lib\threading.py", line 13, in <module>
    from collections import deque
ImportError: No module named collections 

好的,没有模块命名为集合。实际上,当我在我的python25文件夹中搜索集合时,它就不存在了。我读过它位于Modules/_collectionsmodule.c,我也找不到。

整个事情的关键是我可以从解释器导入集合,我可以在解释器中from threading import Time, Timer

我在这台机器上同时拥有python 2.5和2.6,它运行的是Windows 7。

有人能指出我正确的方向吗?

0 个答案:

没有答案