ImportError:无法导入名称add_metaclass

时间:2017-05-06 20:21:42

标签: nltk six

  

ImportError:无法导入名称add_metaclass

我收到了这个错误。我正在使用python27并安装了nltk和nltk_data,但是仍然没有解决错误。请帮忙。

Traceback (most recent call last):
  File "C:/Users/swati/PycharmProjects/finalproject/one.py", line 1, in <module>
    from nltk.stem import PorterStemmer
  File "C:\Python27\lib\site-packages\nltk\__init__.py", line 128, in <module>
    from nltk.chunk import *
 File "C:\Python27\lib\site-packages\nltk\chunk\__init__.py", line 157, in <module>
    from nltk.chunk.api import ChunkParserI
  File "C:\Python27\lib\site-packages\nltk\chunk\api.py", line 13, in <module>
    from nltk.parse import ParserI
  File "C:\Python27\lib\site-packages\nltk\parse\__init__.py", line 77, in <module>
    from nltk.parse.malt import MaltParser
  File "C:\Python27\lib\site-packages\nltk\parse\malt.py", line 14, in <module>
    from six import text_type
  File "C:\Users\swati\PycharmProjects\finalproject\six.py", line 2, in <module>
    from nltk.corpus import state_union
  File "C:\Python27\lib\site-packages\nltk\corpus\__init__.py", line 64, in <module>
    from nltk.tokenize import RegexpTokenizer
  File "C:\Python27\lib\site-packages\nltk\tokenize\__init__.py", line 64, in <module>
    from nltk.tokenize.mwe      import MWETokenizer
  File "C:\Python27\lib\site-packages\nltk\tokenize\mwe.py", line 33, in <module>
    from nltk.tokenize.api import TokenizerI
  File "C:\Python27\lib\site-packages\nltk\tokenize\api.py", line 14, in <module>
    from six import add_metaclass
ImportError: cannot import name add_metaclass

使用退出代码1完成处理

0 个答案:

没有答案