0
从tethne进口槌在我的Python项目中,我一直在说:错误蟒蛇
from tethne.model.corpus import mallet
,但我的问题是,当我跑我的项目,我在pycharm控制台中看到这些错误:
Traceback (most recent call last):
File "D:/Python-Workspace(s)/BehnazDemo/Demo.py", line 1, in <module>
from tethne.model.corpus import mallet
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\site-packages\tethne-0.8-py3.5.egg\tethne\__init__.py", line 20, in <module>
from tethne.classes.paper import Paper
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\site-packages\tethne-0.8-py3.5.egg\tethne\classes\paper.py", line 5, in <module>
from tethne.classes.feature import Feature, feature
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\site-packages\tethne-0.8-py3.5.egg\tethne\classes\feature.py", line 20, in <module>
from itertools import chain, izip
ImportError: cannot import name 'izip'
我该如何解决这个问题?
谢谢。
我已经使用python 3.5,并且我还根据您的解决方案添加了zip_longest,并且使用了try - 除了再次运行后,我看到了同样的错误,我已经添加到了我的问题中。你能帮助我吗? – brelian
@SiHa:我已经使用python 3.5,并且还根据您的解决方案添加了zip_longest,并且使用了try - 除了再次运行后,我看到了同样的错误,我已经添加到了我的问题中。你能帮助我吗? – brelian
@brelian您应该从'itertools import chain,izip'中的''行中移除'izip'.顺便说一下,您还可以在Github [tethne](https://github.com/diging/tethne)更多的支持。 – McGrady