Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to download spaCy data model in Windows using Enthought Canopy #978

Closed
wmaharani opened this issue Apr 13, 2017 · 4 comments
Closed
Labels
install Installation issues windows Issues related to Windows

Comments

@wmaharani
Copy link

Hi..
I've installed spaCy by using the following command after unzipping:
python setup.py install

Now, I'm trying to download spaCy data model in Windows using Enthought Canopy with "python -m spacy download en".

But the following error occurs:

`(Canopy 64bit) C:\Users\Warih>python -m spacy download en

Downloading en_core_web_sm-1.2.0/en_core_web_sm-1.2.0.tar.gz

Collecting https:/explosion/spacy-models/releases/download/en_core_w
eb_sm-1.2.0/en_core_web_sm-1.2.0.tar.gz
Downloading https:/explosion/spacy-models/releases/download/en_cor
e_web_sm-1.2.0/en_core_web_sm-1.2.0.tar.gz (52.2MB)
100% |################################| 52.2MB 149kB/s
Requirement already satisfied (use --upgrade to upgrade): en-core-web-sm==1.2.
0 from https:/explosion/spacy-models/releases/download/en_core_web_s
m-1.2.0/en_core_web_sm-1.2.0.tar.gz in c:\users\warih\appdata\local\enthought\ca
nopy\user\lib\site-packages
Requirement already satisfied: spacy<2.0.0,>=1.7.0 in c:\users\warih\appdata\loc
al\enthought\canopy\user\lib\site-packages (from en-core-web-sm==1.2.0)
Requirement already satisfied: numpy>=1.7 in c:\users\warih\appdata\local\enthou
ght\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-sm==1.2
.0)
Requirement already satisfied: murmurhash<0.27,>=0.26 in c:\users\warih\appdata
local\enthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core
-web-sm==1.2.0)
Requirement already satisfied: cymem<1.32,>=1.30 in c:\users\warih\appdata\local
\enthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-
sm==1.2.0)
Requirement already satisfied: preshed<2.0.0,>=1.0.0 in c:\users\warih\appdata\l
ocal\enthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-
web-sm==1.2.0)
Requirement already satisfied: thinc<6.6.0,>=6.5.0 in c:\users\warih\appdata\loc
al\enthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-we
b-sm==1.2.0)
Requirement already satisfied: plac<1.0.0,>=0.9.6 in c:\users\warih\appdata\loca
l\enthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web
-sm==1.2.0)
Requirement already satisfied: six in c:\users\warih\appdata\local\enthought\can
opy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-sm==1.2.0)
Requirement already satisfied: pathlib in c:\users\warih\appdata\local\enthought
\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-sm==1.2.0)

Requirement already satisfied: ujson>=1.35 in c:\users\warih\appdata\local\entho
ught\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-sm==1.
2.0)
Requirement already satisfied: dill<0.3,>=0.2 in c:\users\warih\appdata\local\en
thought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-sm=
=1.2.0)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in c:\users\warih\appdata
\local\enthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-cor
e-web-sm==1.2.0)
Requirement already satisfied: regex==2017.4.5 in c:\users\warih\appdata\local\e
nthought\canopy\user\lib\site-packages (from spacy<2.0.0,>=1.7.0->en-core-web-sm
==1.2.0)
Requirement already satisfied: wrapt in c:\users\warih\appdata\local\enthought\c
anopy\user\lib\site-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.0,>=1.7.0->en-
core-web-sm==1.2.0)
Requirement already satisfied: tqdm<5.0.0,>=4.10.0 in c:\users\warih\appdata\loc
al\enthought\canopy\user\lib\site-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.
0,>=1.7.0->en-core-web-sm==1.2.0)
Requirement already satisfied: cytoolz<0.9,>=0.8 in c:\users\warih\appdata\local
\enthought\canopy\user\lib\site-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.0,

=1.7.0->en-core-web-sm==1.2.0)
Requirement already satisfied: termcolor in c:\users\warih\appdata\local\enthoug
ht\canopy\user\lib\site-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.0,>=1.7.0-
en-core-web-sm==1.2.0)
Requirement already satisfied: pyreadline>=1.7.1 in c:\users\warih\appdata\local
\enthought\canopy\user\lib\site-packages (from dill<0.3,>=0.2->spacy<2.0.0,>=1.7
.0->en-core-web-sm==1.2.0)
Requirement already satisfied: toolz>=0.8.0 in c:\users\warih\appdata\local\enth
ought\canopy\user\lib\site-packages (from cytoolz<0.9,>=0.8->thinc<6.6.0,>=6.5.0
->spacy<2.0.0,>=1.7.0->en-core-web-sm==1.2.0)
Traceback (most recent call last):
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3
348.win-x86_64\lib\runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3
348.win-x86_64\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\spa
cy_main
.py", line 138, in
plac.Interpreter.call(CLI)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 1142, in call
print(out)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 914, in exit
self.close(exctype, exc, tb)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 952, in close
self._interpreter.throw(exctype, exc, tb)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 964, in make_interpreter
arglist = yield task
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 1139, in call
raise
(task.etype, task.exc, task.tb)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 380, in wrap
for value in genobj:
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 95, in gen_exc
raise
(etype, exc, tb)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_ext.py", line 966, in make_interpreter
cmd, result = self.parser.consume(arglist)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\pla
c_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\spa
cy_main
.py", line 33, in download
cli_download(model, direct)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\spa
cy\cli\download.py", line 25, in download
link_package(model_name, model, force=True)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\spa
cy\cli\link.py", line 27, in link_package
symlink(model_path, link_name, force)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\User\lib\site-packages\spa
cy\cli\link.py", line 50, in symlink
subprocess.call(command, shell=True)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3
348.win-x86_64\lib\subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3
348.win-x86_64\lib\subprocess.py", line 710, in init
errread, errwrite)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3
348.win-x86_64\lib\subprocess.py", line 913, in _execute_child
args = list2cmdline(args)
File "C:\Users\Warih\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3
348.win-x86_64\lib\subprocess.py", line 616, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable

(Canopy 64bit) C:\Users\Warih>`

Your Environment

  • Operating System: Windows 8
  • Python Version Used: 2.7.11 64 bit
  • spaCy Version Used: 1.7.5
  • Environment Information: Enthought canopy
@ines
Copy link
Member

ines commented Apr 13, 2017

Sorry – this was a bug and has since been fixed on master. For more info and a workaround, see #970.

In short, the model downloaded and installed correctly, but spaCy failed to create a symlink for it in spacy/data. So you can either do that manually, or import the model as a module instead:

import en_core_web_sm
nlp = en_core_web_sm.load()
doc = nlp(u'This is a sentence.')

@ines ines added install Installation issues windows Issues related to Windows labels Apr 13, 2017
@wmaharani
Copy link
Author

OK..I'll try..Thank you very much!!

@ines
Copy link
Member

ines commented Apr 16, 2017

This issue should now be fixed in v1.8.0!

@ines ines closed this as completed Apr 16, 2017
@lock
Copy link

lock bot commented May 8, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
install Installation issues windows Issues related to Windows
Projects
None yet
Development

No branches or pull requests

2 participants