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

[E048] Can't import language de from spacy.lang. #1210

Closed
aourednik opened this issue Jul 5, 2018 · 4 comments
Closed

[E048] Can't import language de from spacy.lang. #1210

aourednik opened this issue Jul 5, 2018 · 4 comments
Labels
type:question 💬 Question around usage, examples

Comments

@aourednik
Copy link

Rasa NLU version: 0.12.3

Operating system: CentOS Linux release 7.5.1804 (Core)

Issue:

Trying to run a Rasa_NLU server with

python -m rasa_nlu.server --path python/pure_nlu --emulate luis

Server starts but model fails to load.

2018-07-05 14:58:35+0200 [-] 2018-07-05 14:58:35 ERROR    __main__  - [E048] Can't import language de from spacy.lang.
2018-07-05 14:58:35+0200 [-] Traceback (most recent call last):
2018-07-05 14:58:35+0200 [-]   File "/home/user/miniconda3/lib/python3.6/site-packages/spacy/util.py", line 50, in get_lang_class
2018-07-05 14:58:35+0200 [-]     module = importlib.import_module('.lang.%s' % lang, 'spacy')
...

Upon checking the availability of the language in spacy, however, the language is available:

[user@server barchatbot]$ python -m spacy info

    Info about spaCy

    spaCy version      2.0.11         
    Location           /home/user/miniconda3/lib/python3.6/site-packages/spacy
    Platform           Linux-3.10.0-123.8.1.el7.x86_64-x86_64-with-centos-7.5.1804-Core
    Python version     3.6.5          
    Models             de

http://localhost:5000/status gives

{
  "available_projects": {
    "default": {
      "status": "ready",
      "available_models": [
        "model_20180524-150529"
      ],
      "loaded_models": []
    }
  }
}

Any advice?

@wrathagom
Copy link
Contributor

@aourednik did you get this working?

@wrathagom wrathagom added the type:question 💬 Question around usage, examples label Jul 10, 2018
@aourednik
Copy link
Author

@wrathagom No, not yet. The strangest thing is, if I try to run get_lang_class (the function in spacy.util that raises the error) directly from the command line, it returns the correct class instead:

[user@server]$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from spacy import util
>>> a = util.get_lang_class('de')
>>> a
<class 'spacy.lang.de.German'>

@aourednik
Copy link
Author

aourednik commented Jul 17, 2018

OK, this seems to be a CentOS only error, related to libstdc++.so.6(GLIBCXX_3.4.21)(64bit) not being available.
See e.g. https://stackoverflow.com/questions/48999946/libstdc-so-6glibcxx-3-4-2164bit-is-needed-centos-7-error

File "/home/user/miniconda3/lib/python3.6/site-packages/spacy/language.py", line 18, in <module>
    from .pipeline import DependencyParser, Tensorizer, Tagger, EntityRecognizer
  File "pipeline.pyx", line 1, in init spacy.pipeline
  File "arc_eager.pxd", line 12, in init spacy.syntax.nn_parser
  File "search.pxd", line 35, in init spacy.syntax.arc_eager
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/user/miniconda3/lib/python3.6/site-packages/thinc/extra/search.cpython-36m-x86_64-linux-gnu.so)

conda install libgcc does not help, since the most recent version of libgcc is already installed.
I did not find a workaround.

@akelad
Copy link
Contributor

akelad commented Jul 18, 2018

since this seems to be a non Rasa related issue, I'll close this for now :) of course feel free to re-open if other problems still persist after finding a workaround for this one. (PS. have you seen this issue yet? ContinuumIO/anaconda-issues#483 - maybe some of those instructions will work?)

@akelad akelad closed this as completed Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question 💬 Question around usage, examples
Projects
None yet
Development

No branches or pull requests

3 participants