从IBM_WATSON导入ToneAnalayzer时的Inscorterror
当我尝试使用代码从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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑您在不同项目之间的要求相互矛盾。
为了避免这样的冲突,我建议使用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.