-2

我是一名初学者,正在使用 RASA 框架开发一个 Chatbot 项目。当我尝试使用“pip install rasa”命令或使用“pip install -r requirements.txt”在require.txt [快照附加]中的依赖项安装RASA时,我遇到了以下错误。为了解决这个问题,我更改了 Requirement.txt 中的关注依赖版本,但即使这样也帮不了我。

例如在以下情况下,每个日志都需要“fbmessenger~=6.0”而不是版本 5.0.0(现有的)。

错误:rasa 1.3.9 要求 fbmessenger~=6.0,但您将拥有不兼容的 fbmessenger 5.0.0

如果我在 require.txt 文件中将版本 5.0 更改为 6.0 并运行命令,那么它将再次抛出错误,现在需要 5.0 版本。喜欢

错误:rasa 1.2 要求 fbmessenger~=5.0,但您将拥有不兼容的 fbmessenger 6.0.0。

错误跟踪:-

ERROR: tensorflow 1.14.0 has requirement wrapt>=1.11.1, but you'll have wrapt 1.10.0 which is incompatible.
ERROR: rasa 1.3.9 has requirement fbmessenger~=6.0, but you'll have fbmessenger 5.0.0 which is incompatible.
ERROR: rasa 1.3.9 has requirement matplotlib~=3.0, but you'll have matplotlib 2.0.0 which is incompatible.
ERROR: rasa 1.3.9 has requirement packaging~=19.0, but you'll have packaging 18.0 which is incompatible.
ERROR: rasa 1.3.9 has requirement pika~=1.0.0, but you'll have pika 0.12.0 which is incompatible.
ERROR: rasa 1.3.9 has requirement python-socketio>=4.3.1, but you'll have python-socketio 3.0.0 which is incompatible.
ERROR: rasa 1.3.9 has requirement pytz~=2019.1, but you'll have pytz 2018.9 which is incompatible.
ERROR: rasa 1.3.9 has requirement redis~=3.3.5, but you'll have redis 2.0.0 which is incompatible.
ERROR: rasa-x 0.21.4 has requirement pika~=1.0.0, but you'll have pika 0.12.0 which is incompatible.
ERROR: rasa-x 0.21.4 has requirement requests~=2.22, but you'll have requests 2.21.0 which is incompatible.
ERROR: rasa-sdk 1.3.3 has requirement ConfigArgParse~=0.14, but you'll have configargparse 0.13.0 which is incompatible.
ERROR: rasa-core 0.13.8 has requirement tensorflow~=1.12.0, but you'll have tensorflow 1.14.0 which is incompatible.
ERROR: gym 0.15.3 has requirement cloudpickle~=1.2.0, but you'll have cloudpickle 0.6.1 which is incompatible.

Requirement.txt 内容:-

gspread==3.0.0
beautifulsoup4~=4.6.3
requests~=2.21.0
geopy~=1.18.1
pandas~=0.24.1
rasa==1.3.9
future==0.17.1
fakeredis==0.10.1
keras-applications==1.0.6
keras-preprocessing==1.0.5
dill==0.2.9
tensorflow==1.14.0
wrapt==1.10.0
fbmessenger==5.0
matplotlib==2.0
packaging==18.0
pika==0.12.0
pyhton-socketio==3.0
pytz==2018.9
redis==2.0
ConfigArgParse==0.13
cloudpickle==0.6.1
mailchimp3==3.0.2
oauth2client==4.1.2

其他详情 : -

OS-Window 10
Python - 3.6.0
pip -19.3
VS Code - 1.39
4

2 回答 2

1

当您尝试安装与新版本不兼容的旧版本时,会发生这种情况。我建议您可以手动安装这些软件包的最新版本,而不是拥有所有文档。

然而,这些软件包中的大多数都带有 rasa。您可以使用以下命令安装它们: pip install rasa

如果您有一些非 rasa 附带的库,只需使用“pip install (package_name)”安装它们

于 2019-10-22T11:12:26.000 回答
0

我觉得您正在尝试在已经存在的虚拟环境(venv)中安装 rasa-x。请创建一个新的 venv 文件夹,然后启动以下命令,一切都会正常工作。

 pip install rasa-x --extra-index-url https://pypi.rasa.com/simple

之前一定有人安装了 rasa-x。早期版本具有不同版本的依赖项,并且在 rasa-x 之间随着其依赖项版本一起升级。现在,当您尝试重新安装它时,您将面临冲突。

如果你有一个特定版本的 rasa-x,比如 0.21.4,那么你可以将它安装在一个新的 venv 中,如下所示:

pip install rasa-x==0.21.4 --extra-index-url https://pypi.rasa.com/simple

我刚刚将版本号附加到包名称中。

于 2019-10-30T09:35:35.630 回答