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

1.7.0 data installation fails for system installation #892

Closed
ghost opened this issue Mar 18, 2017 · 9 comments
Closed

1.7.0 data installation fails for system installation #892

ghost opened this issue Mar 18, 2017 · 9 comments
Labels
install Installation issues models Issues related to the statistical models

Comments

@ghost
Copy link

ghost commented Mar 18, 2017

Seems to be a bug.

Calling this query results in this action:

**python3 -m spacy download de**

    Downloading de_core_news_md-1.0.0/de_core_news_md-1.0.0.tar.gz

Collecting https://github.com/explosion/spacy-models/releases/download/de_core_news_md-1.0.0/de_core_news_md-1.0.0.tar.gz
  Downloading https://github.com/explosion/spacy-models/releases/download/de_core_news_md-1.0.0/de_core_news_md-1.0.0.tar.gz (675.5MB)
    100% |################################| 675.5MB 1.3kB/s
  Requirement already satisfied (use --upgrade to upgrade): de-core-news-md==1.0.0 from https://github.com/explosion/spacy-models/releases/download/de_core_news_md-1.0.0/de_core_news_md-1.0.0.tar.gz in /usr/local/lib/python3.5/dist-packages
Requirement already satisfied: spacy<2.0.0,>=0.101.0 in /usr/local/lib/python3.5/dist-packages (from de-core-news-md==1.0.0)
Requirement already satisfied: ujson>=1.35 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: pathlib in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: dill<0.3,>=0.2 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: numpy>=1.7 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: cymem<1.32,>=1.30 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: murmurhash<0.27,>=0.26 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: thinc<6.6.0,>=6.5.0 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: preshed<2.0.0,>=1.0.0 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: plac<1.0.0,>=0.9.6 in /usr/local/lib/python3.5/dist-packages (from spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: tqdm<5.0.0,>=4.10.0 in /usr/local/lib/python3.5/dist-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: wrapt in /usr/local/lib/python3.5/dist-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: cytoolz<0.9,>=0.8 in /usr/local/lib/python3.5/dist-packages (from thinc<6.6.0,>=6.5.0->spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Requirement already satisfied: toolz>=0.8.0 in /usr/local/lib/python3.5/dist-packages (from cytoolz<0.9,>=0.8->thinc<6.6.0,>=6.5.0->spacy<2.0.0,>=0.101.0->de-core-news-md==1.0.0)
Building wheels for collected packages: de-core-news-md
  Running setup.py bdist_wheel for de-core-news-md ... done
  Stored in directory: /root/.cache/pip/wheels/7b/6d/eb/f381ed9477b58e3dd9a2af69ab455c9fd4de8de39a7beab468
Successfully built de-core-news-md
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/dist-packages/spacy/__main__.py", line 71, in <module>
    plac.Interpreter.call(CLI)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 1142, in call
    print(out)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 914, in __exit__
    self.close(exctype, exc, tb)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 952, in close
    self._interpreter.throw(exctype, exc, tb)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 964, in _make_interpreter
    arglist = yield task
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 1139, in call
    raise_(task.etype, task.exc, task.tb)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 53, in raise_
    raise exc.with_traceback(tb)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 380, in _wrap
    for value in genobj:
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 95, in gen_exc
    raise_(etype, exc, tb)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 53, in raise_
    raise exc.with_traceback(tb)
  File "/usr/local/lib/python3.5/dist-packages/plac_ext.py", line 966, in _make_interpreter
    cmd, result = self.parser.consume(arglist)
  File "/usr/local/lib/python3.5/dist-packages/plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/spacy/__main__.py", line 30, in download
    cli_download(model, direct)
  File "/usr/local/lib/python3.5/dist-packages/spacy/cli/download.py", line 25, in download
    link_package(model_name, model, force=True)
  File "/usr/local/lib/python3.5/dist-packages/spacy/cli/link.py", line 19, in link_package
    meta = get_meta(package_path, origin)
  File "/usr/local/lib/python3.5/dist-packages/spacy/cli/link.py", line 48, in get_meta
    meta = util.parse_package_meta(package_path, package)
  File "/usr/local/lib/python3.5/dist-packages/spacy/util.py", line 159, in parse_package_meta
    raise IOError("Could not read meta.json from %s" % location)

**OSError: Could not read meta.json from /usr/lib/python3/dist-packages/de_core_news_md/meta.json**

When I try to download, uncompress and install the model with Python3.5 I get this error in my code:

File "/home/buz/buz/modules/Speechify.py", line 42, in <module>
    **nlp = spacy.load('de')**
  File "/usr/local/lib/python3.5/dist-packages/spacy/__init__.py", line 51, in load
    return cls(**overrides)
  File "/usr/local/lib/python3.5/dist-packages/spacy/language.py", line 288, in __init__
    if 'vocab' not in overrides \
  File "/usr/local/lib/python3.5/dist-packages/spacy/language.py", line 58, in create_vocab
    tag_map=cls.tag_map, lemmatizer=lemmatizer)
  File "spacy/vocab.pyx", line 101, in spacy.vocab.Vocab.load (spacy/vocab.cpp:4768)
  File "/usr/lib/python3.5/pathlib.py", line 1151, in open
    opener=self._opener)
  File "/usr/lib/python3.5/pathlib.py", line 1005, in _opener
    return self._accessor.open(self, flags, mode)
  File "/usr/lib/python3.5/pathlib.py", line 371, in wrapped
    return strfunc(str(pathobj), *args)
**FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.5/dist-packages/spacy/data/de/vocab/strings.json'**

Solution?

Will try to extract /de_core_news_md-1.0.0/de_core_news_md-1.0.0.tar.gz tomorrow into /usr/local/lib/python3.5/dist-packages/spacy/data/de/ to get my program to run with Spacy 1.7.0 with German model.

Your Environment

Info about spaCy

  • Installed models: cache, pycache
  • Platform: Linux-4.4.0-65-generic-x86_64-with-Ubuntu-16.04-xenial
  • spaCy version: 1.7.0
  • Python version: 3.5.2
@ines
Copy link
Member

ines commented Mar 18, 2017

Thanks for the report and sorry about that. Looks like this might actually be an issue with how the model was packaged – if so, we should be able to simply repackage it and replace the uploaded file.

In case the model was somehow corrupted in the packaging process, you can also download the German model from the previous release (the data is identical) and put it in your spacy/data directory as described here. Just tested this locally and it worked fine for me.

(On an unrelated note, just realised spacy info should exclude the cache directories from the installed models list – right now, it just gets every directory in spacy/data, which is a little confusing. Will add a quick manual fix for this.)

@ines ines added install Installation issues models Issues related to the statistical models labels Mar 18, 2017
@honnibal honnibal changed the title Reproducible, non-installable German model 1.7.0 data installation fails for system installation Mar 18, 2017
@honnibal
Copy link
Member

Damn -- turns out this is somehow different when spaCy is installed system-wide (as opposed to a local directory or virtualenv). Fixing, thanks!

@honnibal
Copy link
Member

Patch now up on PyPi as 1.7.1. Let me know if it doesn't work --- my tests passed for both PyPi and system installation.

@ghost
Copy link
Author

ghost commented Mar 19, 2017

Thank you Matt for your fast help. I wish you all the best and have a relaxing sunday. Beste Grüsse nach Berlin. Sebastian

@thmai
Copy link

thmai commented Apr 8, 2017

I'm on 1.7.5 and having the same problem.

@ines
Copy link
Member

ines commented Apr 8, 2017

@thmai That's strange! Could you run the following command and post the info here?

python -m spacy info --markdown

@thmai
Copy link

thmai commented Apr 10, 2017

@ines thanks so much for your quick reply!
I finally decided to uninstall everything and installed again successfully, downloaded all models successfully too, no problem so far.

@nitinmeharia
Copy link

Got the same error.

Info about spaCy

  • Python version: 2.7.5
  • Platform: Linux-3.10.0-514.16.1.el7.x86_64-x86_64-with-centos-7.3.1611-Core
  • spaCy version: 1.9.0
  • Installed models:

@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 models Issues related to the statistical models
Projects
None yet
Development

No branches or pull requests

4 participants