pythonpipanacondaspacyrasa-nlu

No module named pipeline


I am trying to train some data in rasa-nlu.

So, I installed anaconda, then rasa-nlu and spacy.

But, whenever I try to run

 python -m rasa_nlu.train -c config.json

I get

Traceback (most recent call last):
  File "D:\Ddrive\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "D:\Ddrive\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\Ddrive\lib\site-packages\rasa_nlu\train.py", line 65, in <module>
    do_train(config)
  File "D:\Ddrive\lib\site-packages\rasa_nlu\train.py", line 54, in do_train
    trainer = create_trainer(config)
  File "D:\Ddrive\lib\site-packages\rasa_nlu\train.py", line 31, in create_trainer
    from trainers.spacy_sklearn_trainer import SpacySklearnTrainer
  File "D:\Ddrive\lib\site-packages\rasa_nlu\trainers\spacy_sklearn_trainer.py", line 9, in <module>
    from rasa_nlu.extractors.spacy_entity_extractor import SpacyEntityExtractor
  File "D:\Ddrive\lib\site-packages\rasa_nlu\extractors\spacy_entity_extractor.py", line 7, in <module>
    from spacy.pipeline import EntityRecognizer
ImportError: No module named pipeline

I am not able to install pipeline using conda or pip.


Solution

  • Make sure your spacyversion is up to date (at the time of this writing this would be 1.7).

    http://rasa-nlu.readthedocs.io/en/stable/backends.html#option-2-spacy-sklearn

    You can install the latest version using pip install -U spacy.