使用Python3.6安装NLTK时出错

时间:2017-05-06 20:37:19

标签: python nlp nltk python-3.6

我试图运行" pip install nltk"但是得到了这么多错误。虽然我尝试安装导致错误的依赖项,但它们也没有安装。

Invalid requirement: 'nltk()'
Traceback (most recent call last):
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\packagi
ng\requirements.py", line 92, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\pyparsi
ng.py", line 1617, in parseString
    raise exc
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\pyparsi
ng.py", line 1607, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\pyparsi
ng.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\pyparsi
ng.py", line 3376, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\pyparsi
ng.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\pyparsi
ng.py", line 3164, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 4), (line:1, c
ol:5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install
.py", line 82, in __init__
    req = Requirement(req)
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\packagi
ng\requirements.py", line 96, in __init__
    requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, pars
e error at "'()'"

请检查屏幕截图中的错误:Error Screenshot

1 个答案:

答案 0 :(得分:1)

您似乎没有安装软件包的权限。尝试以管理员身份运行命令行。