从IBM_WATSON导入ToneAnalayzer时的Inscorterror

发布于 2025-01-17 23:52:06 字数 852 浏览 5 评论 0原文

当我尝试使用代码从IBM_WATSON导入ToneAnalyzerv3时:

from ibm_watson import ToneAnalyzerV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

但是它显示:

Importerror:无法从'ibm_watson'导入名称'ToneAnalyzerv3' (/usr/local/lib/python3.7/dist-packages/ibm_watson/< strong> init .py)

当我安装ibm_watson库时,也有另一个错误

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
google-colab 1.0.0 requires requests\~=2.23.0, but you have requests 2.27.1 which is incompatible.
datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible

,但是当我重新运行包含代码的单元格时

!pip install ibm_watson

,走了

while I tried to import ToneAnalyzerV3 from ibm_watson using the code :

from ibm_watson import ToneAnalyzerV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

but its showing:

ImportError: cannot import name 'ToneAnalyzerV3' from 'ibm_watson'
(/usr/local/lib/python3.7/dist-packages/ibm_watson/init.py)

while I was installing ibm_watson library there was also another error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
google-colab 1.0.0 requires requests\~=2.23.0, but you have requests 2.27.1 which is incompatible.
datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible

but when I rerun the cell containing the code

!pip install ibm_watson

it was gone

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

跨年 2025-01-24 23:52:06

我怀疑您在不同项目之间的要求相互矛盾。

为了避免这样的冲突,我建议使用Virtualenv或同等标准隔离每个环境。

I suspect that you have conflicting requirements across different projects.

To avoid conflicts like this leaking across projects, I would recommend isolating each environment using virtualenv or equivalent.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文