无法将 azure.cognitiveservices.speech 作为 speechsdk 导入 python(Azure 函数)错误(分段错误(核心已转储))
Not able to import azure.cognitiveservices.speech as speechsdk in python (Azure functions) Error (Segmentation fault (core dumped))
出现以下错误,
user@example-admin:/usr/lib/python3.6$ pip3 install azure.cognitiveservices.speech
Defaulting to user installation because normal site-packages is not writeable
Collecting azure.cognitiveservices.speech
Using cached azure_cognitiveservices_speech-1.12.1-cp36-cp36m-manylinux1_x86_64.whl (3.7 MB)
Installing collected packages: azure.cognitiveservices.speech
Successfully installed azure.cognitiveservices.speech
user@example-admin:/usr/lib/python3.6$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
错误:
>>> import azure.cognitiveservices.speech as speechsdk
python3: Relink `/lib/x86_64-linux-gnu/libsystemd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for
IFUNC symbol `clock_gettime'
python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for
IFUNC symbol `clock_gettime'
Segmentation fault (core dumped)
相同的步骤适用于 AWS(EC2 和 Lambda)。请就如何将模块 azure.cognitiveservices.speech 作为 speechsdk 导入 python.
中的 azure ubuntu 和函数提出建议
此错误是因为 Azure ubuntu 虚拟机中不存在名为“libasound2”的包,通过使用以下命令安装解决,
sudo apt-get install libasound2 alsa-utils alsa-oss
出现以下错误,
user@example-admin:/usr/lib/python3.6$ pip3 install azure.cognitiveservices.speech
Defaulting to user installation because normal site-packages is not writeable
Collecting azure.cognitiveservices.speech
Using cached azure_cognitiveservices_speech-1.12.1-cp36-cp36m-manylinux1_x86_64.whl (3.7 MB)
Installing collected packages: azure.cognitiveservices.speech
Successfully installed azure.cognitiveservices.speech
user@example-admin:/usr/lib/python3.6$ python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
错误:
>>> import azure.cognitiveservices.speech as speechsdk
python3: Relink `/lib/x86_64-linux-gnu/libsystemd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for
IFUNC symbol `clock_gettime'
python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for
IFUNC symbol `clock_gettime'
Segmentation fault (core dumped)
相同的步骤适用于 AWS(EC2 和 Lambda)。请就如何将模块 azure.cognitiveservices.speech 作为 speechsdk 导入 python.
中的 azure ubuntu 和函数提出建议此错误是因为 Azure ubuntu 虚拟机中不存在名为“libasound2”的包,通过使用以下命令安装解决,
sudo apt-get install libasound2 alsa-utils alsa-oss