没有模块命名管道

时间:2017-03-02 06:29:06

标签: python pip anaconda spacy rasa-nlu

我正在尝试在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安装管道。

1 个答案:

答案 0 :(得分:3)

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

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

您可以使用安装最新版本 pip install -U spacy