经过多次尝试调查

此次成功案例 paddlespeech(develop)版本

环境

uabntu22.04

paddlepaddle=2.5.0(安装的方法查看我的其他文章)

gcc5安装方法https://www.cnblogs.com/qqdpp/p/17947028

全局环境python 3.8

anconda(python=3.10)(后来感觉3.10不合适)

安装过程遇见的主要问题 

1、ERROR: Failed building wheel for pyworld

问题解决参考

https://www.cnblogs.com/qqdpp/p/17948582

2、无法定位gcc5的问题

原因:git下的paddlespeech里面的makefile文件有要求apt安装gcc5,但是22.04的apt源根本没有    ,吐槽一下,文件里居然是针对16版本的ubantu的makefile,不跟新了

问题解决参考

https://www.cnblogs.com/qqdpp/p/17947028

3、在后续的gcc5的不用了就可以删掉了

4、No module named 'apt_pkg'

解决方法

 

sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/apt_pkg.so

这个代码你应该不适用

提供一个解决思路

  下载'apt_pkg',定位它,建立软链接

5、安装成功后会启动失败

  再次sudo pip paddlespeech尝试就ok了

 

总结:问题五应该是我conda、python环境与系统python环境的问题,问题四应该也是。

之前的四个文章就是使用的22.04 、conda python3.10、全局环境使用的pip,python应该也是3.10,gcc用的特是测试11版,参看之前的文章把!

 

下面是所有的sudo命令

  100  conda install cudatoolkit=11.2 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/ -c conda-forge -y
  101  sudo nano ~/.bashrc
  102  nvcc -V
  103  nvcc
  104  python
  105  nvcc -
  106  nvcc -v
  107  whereis nvcc
  108  which nvcc
  109  conda list nvcc
  110  nvcc -V
  111  df -hl 
  112  cat /proc/version
  113  sudo fdisk -l
  114  df -hl 
  115  sudo apt install build-essential
  116  sudo pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple 
  117  pip -version
  118  python -m pip --version
  119  sudo apt install python3-pip=23.3.1
  120  apt list -a python3-pip
  121  sudo apt install python3-pip
  122  sudo pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple 
  123  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  124  sudo dpkg -i code_1.85.1-1702462158_amd64.deb 
  125  sudo tar -zxvf gcc-5.4.0.tar.gz
  126  sudo mv ./gcc-5.4.0 /usr/local
  127  cd gcc-5.4.0
  128  cd /usr/local/gcc-5.4.0
  129  ls
  130  cd ..
  131  ls
  132  sudo rm -r /usr/local/gcc-5.4.0
  133  sudo tar -zxvf gcc-5.4.0.tar.gz
  134  cd gcc-5.4.0
  135  ls
  136  sudo ./contrib/download_prerequisites
  137  cd 。。
  138  cd ..
  139  sudo mv ./gcc-5.4.0 /usr/local
  140  cd /usr/local/gcc-5.4.0
  141  cd ..
  142  sudo mkdir gcc-build-5.4.0
  143  cd gcc-build-5.4.0
  144  sudo ../gcc-5.4.0/configure --prefix=/usr/local --enable-checking=release --enable-languages=c,c++ --disable-multilib --disable-libsanitizer
  145  sudo make -j8
  146  sudo make 
  147  sudo vim /etc/apt/sources.list
  148  conda activate paddleps
  149  conda activate paddlesp
  150  pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  151  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  152  sudo nano /etc/apt/sources.list
  153  sudo apt install g++-5 gcc-5
  154  python
  155  sudo apt-get install python3.9
  156  sudo update-alternatives --config python
  157  python --version
  158  conda create --name padd python=3.8
  159  conda install -c conda-forge libsox
  160  apt list -a libsox-dev
  161  dpkg -l | grep libsox3
  162  apt list -a libsox3
  163  sox --version
  164  ldd $(which sox)
  165  pip --version
  166  sudo -H pip --version
  167  sudo -H pip show sox
  168  python3.9 -m pip --version
  169  conda activate padd
  170  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  171  python --version
  172  sudo -H pip --version
  173  sudo apt install python3.8
  174  sudo apt update
  175  sudo apt install python3.8
  176  sudo apt-get install python-software-properties
  177  sudo add-apt-repository ppa:fkrull/deadsnakes
  178  sudo apt install software-properties-common
  179  sudo add-apt-repository ppa:deadsnakes/ppa
  180  sudo apt install python3.8
  181  python3.8 –version
  182  sudo python3 --version
  183  whereis python=3.8
  184  sudo python3 --version
  185  python --version
  186  sudo -H pip --version
  187  sudo python3.8 -m pip --version
  188  sudo apt-get install python3.8-distutils
  189  sudo python3.8 -m pip --version
  190  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  191  sudo apt-get install libsox-dev
  192  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  193  sudo nano /etc/apt/sources.list
  194  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  195  sudo nano /etc/apt/sources.list
  196  sudo apt-get update
  197  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
  198  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B
  199  sudo apt-get update
  200  sudo apt install gcc-5 g++5
  201  sudo apt-get install gcc-5 g++-5
  202  gcc -version
  203  conda deactivate
  204  gcc -version
  205  gcc-5 --version
  206  g++-5 --version
  207  gcc --version
  208  sudo update-alternatives --config gcc
  209  export CC=gcc-5
  210  gcc --version
  211  conda deactivate
  212  gcc-5 --version
  213  g++-5 --version
  214  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5.5 80
  215  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5.5 80
  216  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5.3 80 
  217  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5.3 80
  218  which gcc-5.5
  219  which g++-5.5
  220  which gcc-5.3
  221  which g++-5.3
  222  dpkg -L gcc-5
  223  dpkg -L g++-5
  224  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80
  225  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 80
  226  gcc --version
  227  conda activate padd
  228  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  229  conda activate paddlesp
  230  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  231  python --version
  232  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1
  233  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
  234  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1
  235  gcc --version
  236  conda deactivate
  237  gcc --version
  238  sudo update-alternatives --config gcc
  239  gcc-11 --version
  240  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
  241  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
  242  gcc --version
  243  conda activate paddlesp
  244  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  245  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
  246  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
  247  gcc --version
  248  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80
  249  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 80
  250  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 20
  251  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 20
  252  gcc --version
  253  conda deactivate
  254  python --version
  255  conda activate paddlesp
  256  python --version
  257  python -V
  258  gcc --version
  259  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  260  python --version
  261  sudo python3 --version
  262  sudo apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
  263  wget https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz
  264  tar -xf Python-3.10.13.tgz
  265  cd Python-3.10.13
  266  sudo ./configure --enable-optimizations
  267  sudo make -j$(nproc)
  268  sudo make altinstall
  269  python3.10.13 --version
  270  conda activate paddlesp
  271  pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  272  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  273  conda deactivate
  274  sudo python --version
  275  sudo python3 --version
  276  python3 --version
  277  ls /usr/bin/python3.*
  278  sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
  279  sudo update-alternatives --config python3
  280  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  281  速度哦
  282  python3.8 -m pip install git+https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder
  283  python --version
  284  python3 --version
  285  sudo pip install pyworld
  286  conda activate paddlesp
  287  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  288  sudo apt-get install libsndfile1-dev
  289  sudo apt-get install libasound2-dev
  290  sudo apt-get install portaudio19-dev
  291  sudo python3.8 -m pip install pyworld
  292  pip install pyworld
  293  sudo pip install pyworld
  294  sudo pip install pyworld=0.3.3
  295  sudo pip install pyworld==0.3.
  296  sudo pip install pyworld
  297  conda deactivate
  298  python3 --version
  299  conda deactivate
  300  which python3
  301  which pip
  302  sudo apt-get install --reinstall python3-apt
  303  conda deactivate
  304  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  305  conda activate paddlesp
  306  sudo pip install pyworld
  307  sudo pip uninstall pyworld
  308  sudo pip install pyworld
  309  sudo apt-get install libasound2-dev portaudio19-dev
  310  sudo pip install pyworld
  311  pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple 
  312  sudo pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple 
  313  gcc --version
  314  sudo apt-get update
  315  sudo apt-get install libworld-dev
  316  sodu pip install libworld-dev
  317  sudo pip install pyworld
  318  sudo apt-get install python3-dev
  319  sudo apt-get install python3-pip
  320  sudo pip install pyworld
  321  sudo apt-get install libpython3.8-dev
  322  sudo pip install pyworld
  323  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  324  sudo apt update
  325  pip install python-apt
  326  cd tools
  327  make
  328  sudo make
  329  sudo nano /etc/apt/sources.list
  330  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  331  cd ..
  332  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  333  sudo apt-get install make
  334  sudo apt-get install python3-apt
  335  python3 --version
  336  sudo /path/to/conda/python3 --version
  337  dpkg -l | grep python3-apt
  338  which python3
  339  sudo pip install pytest-runner -i https://pypi.tuna.tsinghua.edu.cn/simple 
  340  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  341  conda deactivate
  342  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  343  conda activate paddlesp
  344  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  345  make
  346  ls
  347  cd tools
  348  make
  349  sudo make
  350  sudo apt update
  351  sudo find /usr/lib/ -name apt_pkg\*
  352  ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /path/to/your/virtualenv/lib/python3.7/site-packages/
  353  ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /path/to/your/virtualenv/lib/python3.8/site-packages/
  354  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  355  cd ..
  356  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  357  cd
  358  conda deactivate
  359  ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /path/to/your/virtualenv/lib/python3.8/site-packages/
  360  sudo find /usr/lib/ -name apt_pkg\*
  361  ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /home/ww/envs/paddlesp/lib/python3.8/site-packages/
  362  sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /usr/lib/python3.8/site-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so
  363  conda activate paddlesp
  364  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  365  cd tools
  366  make
  367  sudo
  368  sudo make
  369  ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /path/to/your/virtualenv/lib/python3.8/site-packages/
  370  sudo make
  371  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  372  cd
  373  cd /git_house/PaddleSpeech/
  374  kls
  375  ls
  376  cd git_house/
  377  ls
  378  cdP
  379  cd PaddleSpeech/
  380  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  381  ls
  382  cd demos/
  383  ls
  384  cd streaming_asr_server/
  385  ls
  386  paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml
  387  sudo paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml
  388  conda deactivate
  389  paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml
  390  conda activate paddlesp
  391  paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml
  392  conda deactivate
  393  pip3 list
  394  ls
  395  cd
  396  ls
  397  cd..
  398  cd ..
  399  ls
  400  cd ww/
  401  ls
  402  cd /usr/lib
  403  ls
  404  cd python3.8
  405  ls
  406  cd
  407  ls
  408  python --version
  409  python3 --version
  410  sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/apt_pkg.so
  411  paddlespeech_server start --help
  412  conda deactivate
  413  paddlespeech_server start --help
  414  conda activate paddlesp
  415  paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml
  416  nivdia -smi
  417  nvidia
  418  nvidia-smi
  419  paddlespeech_server start --help
  420  pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  421  cd ..
  422  pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  423  cd ..
  424  pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  425  sudo pip install -e .[develop] -i https://pypi.tuna.tsinghua.edu.cn/simple
  426  wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
  427  history

大概是这些

posted on 2024-01-06 21:53  大风吹屁股  阅读(239)  评论(0编辑  收藏  举报