首页 > 解决方案 > 如何安装 ibm watson 模块?

问题描述

我正在尝试在 Python 3 中运行 IBM Watson 的自然语言理解,但无法安装模块。这是我开始的:

import json 
from ibm_watson import NaturalLanguageUnderstandingV1 
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator 
from ibm_watson.natural_language_understanding_v1 import Features,EntitiesOptions, KeywordsOptions

错误消息是:

没有名为 ibm_watson 的模块

标签: ibm-watsonsentiment-analysis

解决方案


Make sure that you have installed the latest version of the Watson Python SDK (it's 4.2.1 right now). For example, with pip:

pip install --upgrade "ibm-watson>=4.2.1"

See the API reference for more information and examples


推荐阅读