我试着运行这段代码
# Taking input from user
question = input('Question: ')
# App id obtained by the above steps
app_id = "XXXXX-57578YL87T"
# Instance of wolf ram alpha
# client class
client = wolframalpha.Client(app_id)
# Stores the response from
# wolf ram alpha
res = client.query(question)
# Includes only text from the response
answer = next(res.results).text
print(answer)
然而,它告诉我没有名为"wolframalpha"的模块我使用水作为环境……你知道让我在anaconda安装wolframalpha的命令吗?
网站推荐使用pip
:
pip install wolframclient
但是,也有一个可以使用conda
安装的包,见这里。它是WolframResearch
通道的唯一包,可以使用以下命令安装:
conda install -c wolframresearch wolframclient
尝试在终端安装wolframalpha。