spacy english model install is failing

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 05:59:58

问题


windows 10, python 26 - 32 bit. vc++ 32 bit. console as admin.

failing to install English model as instructed here tried also German. tried to download and link it manually. something wrong with spacy link command. Anyone knows about this issue?

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:


I think it's a bug in pathlib, and has nothing to do with spacy.

You can work around it, but it's ugly.

Edit line 1167 of C:\Python27\lib\site-packages\pathlib.py. Comment it out.

Re-run 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


来源:https://stackoverflow.com/questions/42914239/spacy-english-model-install-is-failing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!