我试图按照
this tutorial将自然语言处理包spaCy安装到python 3 anaconda环境中,Windows 8
我打开控制台,cd-ed到我的site-packages文件夹,激活环境,pip-ed进行安装,一切都很好,除了我无法在这里运行第二个命令
$pip install spacy
$python -m spacy.en.download
现在我可以成功加载包但是当我运行下面的第二行时,我收到以下错误
>>> from spacy.en import English #this works
>>> nlp = English() #this doesn't
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\garrett\Anaconda\envs\py3k\lib\site-packages\spacy\en\__init__.py", line 64, in __init__
get_lex_props=get_lex_props)
File "spacy/vocab.pyx", line 42, in spacy.vocab.Vocab.__init__ (spacy/vocab.cpp:2216)
OSError: Directory C:\Users\garrett\Anaconda\envs\py3k\lib\site-packages\spacy\en\data\vocab not found -- cannot load Vocab.
我认为这是因为我无法运行python -m spacy.en.download
谁能让我知道python -m spacy.en.download应该做什么?
任何人都可以提供如何在anaconda环境中安装spaCy的演练吗?
这是我在设置目录,激活python env,运行命令后得到的错误.我试过的前几次,我的spyder编辑器反应迟钝,我杀了控制台,最近一次我得到了这个错误
$cd C:\Users\garrett\Anaconda\envs\py3k\Lib\site-packages
$C:\Users\garrett\Anaconda\envs\py3k\Lib\site-packages>activate py3k
$[py3k] C:\Users\garrett\Anaconda\envs\py3k\Lib\site-packages>python -m spacy.en.download
Moving existing dir C:\Users\garrett\Anaconda\envs\py3k\Lib\site-packages\spacy\en\data to /tmp
Traceback (most recent call last):
File "C:\Users\garrett\Anaconda\envs\py3k\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\garrett\Anaconda\envs\py3k\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
File ".\spacy\en\download.py", line 56, in
plac.call(main)
File ".\plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File ".\plac_core.py", line 195, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File ".\spacy\en\download.py", line 51, in main
shutil.move(DEST_DIR, '/tmp')
File "C:\Users\garrett\Anaconda\envs\py3k\lib\shutil.py", line 521, in move
raise Error("Destination path '%s' already exists" % real_dst)
shutil.Error: Destination path '/tmp\data' already exists
感谢您提供的任何帮助或建议