I have recently installed Prodigy 1.8.5 in a fresh venv.
No matter what I try, I keep getting the following error:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 109, in _get_module_details import(pkg_name)
File "/usr/local/lib/python3.6/site-packages/prodigy/init.py", line 10, in
from . import recipes # noqa
File "/usr/local/lib/python3.6/site-packages/prodigy/recipes/init.py", line 4, in
from . import dep, ner, textcat, pos, compare, terms, generic, image, review # noqa
File "/usr/local/lib/python3.6/site-packages/prodigy/recipes/dep.py", line 7, in
from ..models.dep import DependencyParser, merge_arcs
File "cython_src/prodigy/models/dep.pyx", line 13, in init prodigy.models.dep
ImportError: cannot import name cleanup_beam
I have searched the support site for this error with no luck. Any ideas what can be causing this?
Hi! That's definitely strange – I think the function it's trying to import is in spaCy, so maybe your versions are out-of-sync? Could you run pip list and check which version of spaCy you have installed?
Hi, Ines! I have an "ImportError: cannot import name cleanup_beam" issue too.
I installed Prodigy (v1.10.5) into the new Conda environment. If I try to check the installation by "python -m prodigy stats" command, I'll get:
Traceback (most recent call last):
File "C:\conda\envs\prodigy\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\conda\envs\prodigy\lib\runpy.py", line 144, in get_module_details
return get_module_details(pkg_main_name, error)
File "C:\conda\envs\prodigy\lib\runpy.py", line 111, in get_module_details import(pkg_name)
File "C:\conda\envs\prodigy\lib\site-packages\prodigy_init.py", line 7, in
from . import recipes
File "C:\conda\envs\prodigy\lib\site-packages\prodigy\recipes_init.py", line 4, in
from ..deprecated import recipes # noqa
File "C:\conda\envs\prodigy\lib\site-packages\prodigy\deprecated\recipes.py", line 15, in
from ..models.matcher import PatternMatcher
File "C:\conda\envs\prodigy\lib\site-packages\prodigy\models_init.py", line 1, in
from .ner import EntityRecognizer, merge_spans # noqa: F401
File "cython_src\prodigy\models\ner.pyx", line 11, in init prodigy.models.ner ImportError: cannot import name cleanup_beam
It looks like you might have ended up with an older version of spaCy in your environment that you installed Prodigy into? Maybe you already had your environment set up and it didn't pull in the latest version? Can you try and upgrade spaCy to the latest stable version?