简体   繁体   English

安装pySpeex时出现问题

[英]Problems installing pySpeex

When I try to install the pySpeex wrapper on a raspberry Pi, I've got the following error message: 当我尝试在树莓派上安装pySpeex包装器时,出现以下错误消息:

pi@raspberrypi ~/Desktop/speex-1.2rc2 $ python setup.py install
running install
running build
running build_ext
building 'speex' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict- prototypes -fPIC -I../libspeex -I/usr/include/python2.7 -c speex.c -o     build/temp.linux-armv7l-2.7/speex.o -g
speex.c:10:19: fatal error: speex.h: No such file or directory

I do have both speex.c and also speex.h in the same directory. 我的确在同一目录中同时包含speex.c和speex.h。 What do I do wrong? 我做错了什么?

You probably should create another directory in ~/Desktop/speex-* and call it, for example, build . 您可能应该在~/Desktop/speex-*创建另一个目录并调用它,例如build

mkdir -p build && cd build
python ../setup.py install

The compiler command tries to use the ../libspeex directory for headers, but it should be ~Desktop/libspeex then which's not likely to exist, so you can try to move this directory there or make a symlink to it. 编译器命令尝试使用../libspeex目录作为标头,但该目录应该为~Desktop/libspeex ,因此该目录不太可能存在,因此您可以尝试将该目录移至该目录或对其进行符号链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM