Spacy: CompatiblePackageNotFoundException when trying to download data (Mac OSX, conda installation)

Created on 24 May 2016  Â·  7Comments  Â·  Source: explosion/spaCy

May relate to #232
I'm seeing this error after installing spacy using anacond. I can import spacy from python, but when I try downloading model data:

dowling$ python -m spacy.en.download
Traceback (most recent call last):
File "/Users/dowling/anaconda/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/dowling/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/dowling/anaconda/lib/python2.7/site-packages/spacy/en/download.py", line 13, in
plac.call(main)
File "/usr/local/lib/python2.7/site-packages/plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File "/usr/local/lib/python2.7/site-packages/plac_core.py", line 195, in consume
return cmd, self.func(_(args + varargs + extraopts), *_kwargs)
File "/Users/dowling/anaconda/lib/python2.7/site-packages/spacy/en/download.py", line 9, in main
download('en', force)
File "/Users/dowling/anaconda/lib/python2.7/site-packages/spacy/download.py", line 24, in download
package = sputnik.install(about.__title__, about.version, about.models[lang])
File "/usr/local/lib/python2.7/site-packages/sputnik/init.py", line 44, in install
archive = cache.fetch(package_name)
File "/usr/local/lib/python2.7/site-packages/sputnik/cache.py", line 57, in fetch
package = self.get(package_string)
File "/usr/local/lib/python2.7/site-packages/sputnik/package_list.py", line 68, in get
(self.app_name, self.app_version, package.compatibility))
sputnik.package_list.CompatiblePackageNotFoundException: running spacy 0.100.7 but requires {u'spacy': None}

install

Most helpful comment

Reinstalled spacy and sputnik - seems to work fine. Thanks!

All 7 comments

Any chance someone could help me out with this? The problem persists on my macbook even after upgrading spacy:

Philipps-Air:expertise_classification_keras dowling$ python -m spacy.en.download
Traceback (most recent call last):
  File "/Users/dowling/anaconda/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/dowling/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/dowling/anaconda/lib/python2.7/site-packages/spacy/en/download.py", line 13, in <module>
    plac.call(main)
  File "/usr/local/lib/python2.7/site-packages/plac_core.py", line 309, in call
    cmd, result = parser_from(obj).consume(arglist)
  File "/usr/local/lib/python2.7/site-packages/plac_core.py", line 195, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/Users/dowling/anaconda/lib/python2.7/site-packages/spacy/en/download.py", line 9, in main
    download('en', force)
  File "/Users/dowling/anaconda/lib/python2.7/site-packages/spacy/download.py", line 24, in download
    package = sputnik.install(about.__title__, about.__version__, about.__models__[lang])
  File "/usr/local/lib/python2.7/site-packages/sputnik/__init__.py", line 44, in install
    archive = cache.fetch(package_name)
  File "/usr/local/lib/python2.7/site-packages/sputnik/cache.py", line 57, in fetch
    package = self.get(package_string)
  File "/usr/local/lib/python2.7/site-packages/sputnik/package_list.py", line 68, in get
    (self.app_name, self.app_version, package.compatibility))
sputnik.package_list.CompatiblePackageNotFoundException: running spacy 0.101.0 but requires {u'spacy': None}

What happens if you do which sputnik ? Does it look like you're executing the version of sputnik you expect?

I get that error sometimes, when the version of sputnik being executed is coming from a different virtualenv from spacy. (This happens in particular when I'm using pyenv, and didn't run pyenv rehash). That error is what sputnik ends up printing if it can't find spacy (it's trying to do import spacy so it knows where to install the data).

Btw, you should be able to do:

python -m spacy.en.download --force

That should be working again.

which sputnik gives /Users/dowling/anaconda/bin/sputnik, which is expected. python -m spacy.en.download --force does work, but I cannot load the data from spacy afterwards. I am actually getting a different error now, see https://github.com/spacy-io/sputnik/issues/3:

I'm getting the same error when trying to run python -m spacy.en.download, in the same env as issue spacy-io/spaCy#395 - I'm honestly not sure what even changed in the environment that I am now getting this error rather than the one reported there.
If I run python -m spacy.en.download --force, things are at first, but spacy complains:
RuntimeError: Installed model is not compatible with spaCy version. Please run 'python -m spacy.en.download --force' to install latest compatible model.

I think this should be fixed now — please reopen if not.

Reinstalled spacy and sputnik - seems to work fine. Thanks!

I also get the same issue:

$ python -m spacy.en.download
Traceback (most recent call last):
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/spacy/en/download.py", line 58, in <module>
    plac.call(main)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/plac_core.py", line 328, in call
    cmd, result = parser.consume(arglist)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/spacy/en/download.py", line 42, in main
    package = sputnik.install(about.__title__, about.__version__, about.__default_model__)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/sputnik/__init__.py", line 44, in install
    archive = cache.fetch(package_name)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/sputnik/cache.py", line 57, in fetch
    package = self.get(package_string)
  File "/Users/tianhui/anaconda/envs/datacourse/lib/python2.7/site-packages/sputnik/package_list.py", line 61, in get
    raise CompatiblePackageNotFoundException(package_string)
sputnik.package_list.CompatiblePackageNotFoundException: en>=1.0.0,<1.1.0

with spacy=0.101.0 specified in conda. I just reinstalled conda

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tonywangcn picture tonywangcn  Â·  3Comments

enerrio picture enerrio  Â·  3Comments

prashant334 picture prashant334  Â·  3Comments

besirkurtulmus picture besirkurtulmus  Â·  3Comments

ajayrfhp picture ajayrfhp  Â·  3Comments