1

我正在尝试在 rasa-nlu 中训练一些数据。

所以,我安装了 anaconda,然后是 rasa-nlu 和 spacy。

但是,每当我尝试跑步时

 python -m rasa_nlu.train -c config.json

我明白了

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

我无法使用 conda 或 pip 安装管道。

4

1 回答 1

3

确保您的spacy版本是最新的(在撰写本文时这将是 1.7)。

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

您可以使用 pip install -U spacy.

于 2017-04-15T15:29:55.273 回答