spacy英语模型安装失败

时间:2017-03-20 21:23:56

标签: spacy

windows 10,python 26 - 32位。 vc ++ 32位。 控制台作为管理员。

未能按照说明here安装英文模型 也试过德国人。试图手动下载并链接它。 spacy link命令有问题。 有谁知道这个问题?

Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\python27\lib\site-packages\spacy\__main__.py", line 71, in <module>
    plac.Interpreter.call(CLI)
  File "c:\python27\lib\site-packages\plac_ext.py", line 1142, in call
    print(out)
  File "c:\python27\lib\site-packages\plac_ext.py", line 914, in __exit__
    self.close(exctype, exc, tb)
  File "c:\python27\lib\site-packages\plac_ext.py", line 952, in close
    self._interpreter.throw(exctype, exc, tb)
  File "c:\python27\lib\site-packages\plac_ext.py", line 964, in _make_interpreter
    arglist = yield task
  File "c:\python27\lib\site-packages\plac_ext.py", line 1139, in call
    raise_(task.etype, task.exc, task.tb)
  File "c:\python27\lib\site-packages\plac_ext.py", line 380, in _wrap
    for value in genobj:
  File "c:\python27\lib\site-packages\plac_ext.py", line 95, in gen_exc
    raise_(etype, exc, tb)
  File "c:\python27\lib\site-packages\plac_ext.py", line 966, in _make_interpreter
    cmd, result = self.parser.consume(arglist)
  File "c:\python27\lib\site-packages\plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "c:\python27\lib\site-packages\spacy\__main__.py", line 45, in link
    cli_link(origin, link_name, force)
  File "c:\python27\lib\site-packages\spacy\cli\link.py", line 14, in link
    symlink(origin, link_name, force)
  File "c:\python27\lib\site-packages\spacy\cli\link.py", line 50, in symlink
    link_path.symlink_to(model_path)
  File "c:\python27\lib\site-packages\pathlib.py", line 1167, in symlink_to
    self._accessor.symlink(target, self, target_is_directory)
TypeError: symlink() takes exactly 3 arguments (4 given)

1 个答案:

答案 0 :(得分:2)

我认为它是pathlib中的一个错误,与spacy无关。

你可以解决它,但它很难看。

编辑C:\Python27\lib\site-packages\pathlib.py的第1167行。评论它。

重新运行python -m spacy download en

cd C:\python27\lib\site-packages

mklink /j spacy\data\en en_core_web_sm\en_core_web_sm-1.2.0