我正在研究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位并得到了相同的错误。
pip
是Python的软件包安装程序,可以在命令行中使用,而不是在Python解释器中使用。在Windows上,您可以在Python安装的路径中找到它,如下图所示,我的Python 3.7。
因此,如果已将pip
安装路径添加到环境变量PATH
中,则可以直接在CMD或PowerShell中使用它,也可以移动到其安装路径以使用它。
图1.我的pip
路径已添加到PATH
图2.或者在CMD的路径下使用它
图3.通过CMD中的pip成功安装azure-cognitiveservices-speech
图4.然后在没有任何问题的Python解释器中使用它,或者在Visual Studio Code等其他IDE中使用它。