搭建paddlespeech server遇到的一些问题
最近学习搭建paddlespeech server,遇到了一些问题,这里做一下记录,方便同样遇到类似问题的同学做一下参考:
1、参考paddlespeech 官网教程地址:https://aistudio.baidu.com/projectdetail/4354592?sUid=2470186&shared=1&ts=1665469103092
2、# 国内 github 访问较慢,这里使用 gitee 的仓库 # r1.1 版本
!git clone -b r1.2 https://gitee.com/paddlepaddle/PaddleSpeech #
!git clone https://gitee.com/paddlepaddle/PaddleSpeech %cd PaddleSpeech
!pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple --user
!pip install . -i https://pypi.tuna.tsinghua.edu.cn/simple --user
!pip install uvicorn==0.18.3 --user !pip install typeguard==2.13.3 --user
需要特别注意:这里在安装需要提前准备好环境,环境清单如下:
python环境使用3.9版本
1、安装CMAKE,参考地址:https://blog.csdn.net/xhy020917/article/details/144353409
2、安装paddlepaddle,版本号:2.6.1,不然无法启动server
安装paddlenlp,版本号:2.6.1
3、安装gcc,conda安装命令:conda install -c conda-forge gcc
4、安装PaddleSpeech的过程中出现不兼容的问题,需要特别解决,
有两个包出现兼容性问题
pyarrow 指定安装 18.0.0
pyworld 指定安装 0.3.0
typeguard 指定安装 2.13.3
pip install opencc-python-reimplemented
5、缺少GLCXX。。。的问题:
su root
cd /usr/local/lib64
# 下载最新版本的libstdc.so_.6.0.26
sudo wget http://www.vuln.cn/wp-content/uploads/2019/08/libstdc.so_.6.0.26.zip
unzip libstdc.so_.6.0.26.zip
# 将下载的最新版本拷贝到 /usr/lib64
cp libstdc++.so.6.0.26 /usr/lib64
cd /usr/lib64
# 查看 /usr/lib64下libstdc++.so.6链接的版本
ls -l | grep libstdc++
libstdc++.so.6 ->libstdc++.so.6.0.19
# 删除/usr/lib64原来的软连接libstdc++.so.6,删除之前先备份一份
sudo rm libstdc++.so.6
# 链接新的版本
sudo ln -s libstdc++.so.6.0.26 libstdc++.so.6
# 查看新版本,成功
strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_DEBUG_MESSAGE_LENGTH
同时需要2.28版本的GLIBCXX
建议参考地址:https://www.cnblogs.com/beckyyyy/p/16911058.html