Windows 8 を使用して、python 3 のアナコンダ環境で spaCy をインストールしようとしています。spaCy の Web サイトの指示に従って、次のコマンドを実行します。
$ pip install spacy
$ python -m spacy.en.download
最初のコマンドは一見問題なく動作します。ただし、2 番目のコマンドはエラーを引き起こします: urllib.error.URLError:
完全なトレースバック:
Traceback (most recent call last):
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\urllib\request.py", line 1254, in
do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 1106, in re
quest
self._send_request(method, url, body, headers)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 1151, in _s
end_request
self.endheaders(body)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 1102, in en
dheaders
self._send_output(message_body)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 934, in _se
nd_output
self.send(msg)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 877, in sen
d
self.connect()
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 1252, in co
nnect
super().connect()
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\http\client.py", line 849, in con
nect
(self.host,self.port), self.timeout, self.source_address)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\socket.py", line 693, in create_c
onnection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\socket.py", line 732, in getaddri
nfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11004] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\runpy.py", line 184, in _run_modu
le_as_main
"__main__", mod_spec)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\spacy\en\download.p
y", line 13, in <module>
plac.call(main)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\plac_core.py", line
328, in call
cmd, result = parser.consume(arglist)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\plac_core.py", line
207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\spacy\en\download.p
y", line 9, in main
download('en', force)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\spacy\download.py",
line 24, in download
package = sputnik.install(about.__title__, about.__version__, about.__models
__[lang])
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\sputnik-0.9.3-py3.5
.egg\sputnik\__init__.py", line 37, in install
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\sputnik-0.9.3-py3.5
.egg\sputnik\index.py", line 84, in update
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\site-packages\sputnik-0.9.3-py3.5
.egg\sputnik\session.py", line 43, in open
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\urllib\request.py", line 466, in
open
response = self._open(req, data)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\urllib\request.py", line 484, in
_open
'_open', req)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\urllib\request.py", line 444, in
_call_chain
result = func(*args)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\urllib\request.py", line 1297, in
https_open
context=self._context, check_hostname=self._check_hostname)
File "C:\Users\Tina\Miniconda3\envs\gaia\lib\urllib\request.py", line 1256, in
do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>
他の同様の質問は、プロキシが問題である可能性があることを示唆しているようですが、私はプロキシを使用していません。