2015-08-25 84 views
1

我想使用這個模塊SimpleTorrentStreaming要流與蟒蛇洪流但是當我嘗試錯誤導入期貨蟒蛇

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 
.... 

不過,我仍然得到同樣的錯誤。我真的需要得到這個工作,因爲這是只有 python庫的torrent流。

+0

你確定你使用相同的解釋爲這兩種操作? – jonrsharpe

+0

是的,我敢肯定,因爲我可以'導入SimpleTorrentStreaming'。但請告訴我,如果他們是另一種確定的方式。 – Chaker

+0

謝謝@SDilmac它解決了我的問題。 – Chaker

回答

0

打開SimpleTorrentStreaming.py文件,並SimpleTorrentStreaming這裏的

from concurrent.futures import * 
2

作者替換該行

from futures import ThreadPoolExecutor 

很久以前,我把這個庫從另一個項目中分離出來,出於某種原因,我放棄了它,希望沒有人能夠到我的github倉庫列表的底部,直到我有時間完成它。

我發佈了一個新版本(0.1.1),這個版本實際上起作用。

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

+0

我重寫了python3.5的庫+ https://github.com/XayOn/torrentstream –