导入期货python时出错

时间:2015-08-25 15:44:46

标签: python python-2.7 streaming python-import torrent

我正在尝试使用此模块SimpleTorrentStreaming使用python流式传输torrent但是当我尝试

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
>>> from SimpleTorrentStreaming import SimpleTorrentStreaming

我收到此错误

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/SimpleTorrentStreaming/SimpleTorrentStreaming.py", line 7, in <module>
    from futures import ThreadPoolExecutor
ImportError: No module named futures

告诉我安装futures模块,我做了:

$ pip freeze
....
futures==3.0.3
....

但是我仍然遇到同样的错误。我真的需要让它工作,因为这是用于torrent流的唯一 python库。

2 个答案:

答案 0 :(得分:2)

SimpleTorrentStreaming的作者。

我很久以前将这个库从另一个项目中拆分出来了,出于某种原因我放弃了它,希望没有人能够到达我的github存储库列表的底部,直到我有时间完成它。

我发布了一个实际可行的新版本(0.1.1)。

https://github.com/XayOn/python-simpletorrentstreaming https://pypi.python.org/pypi/SimpleTorrentStreaming/0.1.1

答案 1 :(得分:0)

打开SimpleTorrentStreaming.py文件并替换此行

from futures import ThreadPoolExecutor

from concurrent.futures import *