如何修复Python中的azure-cognitiveservices-speech安装错误

问题描述 投票:-2回答:1

enter image description here我正在研究azure语音服务,目前,我在Python上遇到了这个命令的问题:pip install azure-cognitiveservices-speech

我收到以下错误:“语法无效”。

我按照本教程:https://docs.microsoft.com/fr-fr/azure/cognitive-services/speech-service/quickstart-python

如何使这项工作?

这适用于Windows 7 64位,运行Python 3.6 64位。我已经尝试使用Python 3.7 64位并得到了相同的错误。

编辑:使用cmd prompt.cmd prompt - install error时出现相同的错误

python pip azure-cognitive-services
1个回答
0
投票

pip是Python的软件包安装程序,可以在命令行中使用,而不是在Python解释器中使用。在Windows上,您可以在Python安装的路径中找到它,如下图所示,我的Python 3.7。

enter image description here

因此,如果已将pip安装路径添加到环境变量PATH中,则可以直接在CMD或PowerShell中使用它,也可以移动到其安装路径以使用它。

图1.我的pip路径已添加到PATH

enter image description here

图2.或者在CMD的路径下使用它

enter image description here

图3.通过CMD中的pip成功安装azure-cognitiveservices-speech

enter image description here

图4.然后在没有任何问题的Python解释器中使用它,或者在Visual Studio Code等其他IDE中使用它。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.