简体   繁体   English

无法使用pip安装speex

[英]Cannot install speex using pip

I'm trying to install speex-0.9.1 using pip. 我正在尝试使用pip安装speex-0.9.1。 The error I'm getting is below. 我得到的错误如下。 Any idea how i can work around this? 知道如何解决这个问题吗?

If I'm opening the tar ball which pip is downloading i can see that the .h files are missing. 如果我打开pip正在下载的tar球,我可以看到.h文件丢失了。

Thank 谢谢

[root@localhost speex-0.9.1]# python -m pip -V pip 19.0.3 from /usr/local/lib/python3.6/site-packages/pip (python 3.6) [root @ localhost speex-0.9.1]#python -m pip -V pip 19.0.3 from /usr/local/lib/python3.6/site-packages/pip(python 3.6)

[root@localhost speex-0.9.1]# python -m pip install speex
Collecting speex
  Downloading https://files.pythonhosted.org/packages/90/85/c4c50624de42a36965716369de69b7a5201b91331e91c3629a9301e5f156/speex-0.9.1.tar.gz (51kB)
    100% |████████████████████████████████| 61kB 1.8MB/s 
Building wheels for collected packages: speex
  Building wheel for speex (setup.py) ... error
  Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-q_1mmwjs/speex/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-s4ilcf7f --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building 'speex' extension
  creating build
  creating build/temp.linux-x86_64-3.6
  gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c speex.c -o build/temp.linux-x86_64-3.6/speex.o
  speex.c:347:10: fatal error: speex/speex_resampler.h: No such file or directory
   #include "speex/speex_resampler.h"
            ^~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1

Speex is a Python wrapper for Speex library . SpeexSpeex库的Python包装器。 There are no precompiled wheels at PyPI, there is only source code. PyPI没有预编译的轮子,只有源代码。 To install it you need to compile the speex library or install the speex library from your distribution. 要安装它,您需要编译 speex库或从您的发行版安装 speex库。

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

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