yeyupiaoling / PaddlePaddle-DeepSpeech

基于PaddlePaddle实现的语音识别,中文语音识别。项目完善,识别效果好。支持Windows,Linux下训练和预测,支持Nvidia Jetson开发板预测。
https://yeyupiaoling.blog.csdn.net/article/details/102904306
Apache License 2.0
650 stars 143 forks source link

安装环境出现问题 #116

Closed anip1648 closed 2 years ago

anip1648 commented 2 years ago

python -m pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/运行这条代码时出现如下错错误:

 ERROR: Command errored out with exit status 1:
     command: /home/feimiao/anaconda3/envs/boat_python_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-btqmmnxj/install-record.txt --single-version-externally-managed --compile --install-headers /home/feimiao/anaconda3/envs/boat_python_env/include/python3.7m/pyaudio
         cwd: /tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/
    Complete output (14 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    copying src/pyaudio.py -> build/lib.linux-x86_64-3.7
    running build_ext
    building '_portaudio' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/src
    gcc -pthread -B /home/feimiao/anaconda3/envs/boat_python_env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/feimiao/anaconda3/envs/boat_python_env/include/python3.7m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.7/src/_portaudiomodule.o
    src/_portaudiomodule.c:29:23: fatal error: portaudio.h: 没有那个文件或目录
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/feimiao/anaconda3/envs/boat_python_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-btqmmnxj/install-record.txt --single-version-externally-managed --compile --install-headers /home/feimiao/anaconda3/envs/boat_python_env/include/python3.7m/pyaudio Check the logs for full command output.

ERROR: Command errored out with exit status 1:
   command: /home/feimiao/anaconda3/envs/boat_python_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-y1gw72yz
       cwd: /tmp/pip-install-dhj9o_ly/pyaudio_ec421704f8b443c0b700af997f1f38ad/
  Complete output (14 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  copying src/pyaudio.py -> build/lib.linux-x86_64-3.7
  running build_ext
  building '_portaudio' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/src
  gcc -pthread -B /home/feimiao/anaconda3/envs/boat_python_env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/feimiao/anaconda3/envs/boat_python_env/include/python3.7m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.7/src/_portaudiomodule.o
  src/_portaudiomodule.c:29:23: fatal error: portaudio.h: 没有那个文件或目录
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyaudio
Aulon13 commented 2 years ago

我也是安装这个出现错误,说找该文件的路径不存在。Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

Aulon13 commented 2 years ago

知道了,要在项目的文件路径里面运行。项目包里有个requirements.txt文件,要在该路径下运行才有效!