我正在使用mint Linux mint 13 maya(Linux 3.2.0-23-generic x86-64)
我试图安装scikits.audiolab来执行一些音频信号处理。我已经下载了所有先决条件,即(python dev python numpython setuptools libsndfile dev)。
我已将site.cfg设置为

[sndfile]
include_dirs = /usr/include/
library_dirs = /usr/lib/x86_64-linux-gnu/

我得到以下错误
SndfileInfo:
    FOUND:
libraries = ['sndfile']
library_dirs = ['/usr/lib/x86_64-linux-gnu/']
include_dirs = ['/usr/include/']

    AlsaInfo:
libraries asound not found in /usr/local/lib
libraries asound not found in /usr/lib
scikits/audiolab/soundio/setup.py:21: UserWarning: Alsa not found - alsa backend not build
warnings.warn("Alsa not found - alsa backend not build")
CoreAudioInfo:
scikits/audiolab/soundio/setup.py:31: UserWarning: CoreAudio not found - CoreAudio backend not build
warnings.warn("CoreAudio not found - CoreAudio backend not build")

当我找到一个目标时
/usr/include/alsa/asoundef.h
/usr/include/alsa/asoundlib.h
/usr/include/alsa/sound/asound_fm.h
/usr/include/linux/ultrasound.h
/usr/include/sound/asound.h
/usr/include/sound/asound_fm.h
/usr/include/sys/asoundlib.h
/usr/include/sys/ultrasound.h
/usr/include/x86_64-linux-gnu/sys/ultrasound.h
/usr/lib/i386-linux-gnu/libasound.so.2
/usr/lib/i386-linux-gnu/libasound.so.2.0.0
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_conf_pulse.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_ctl_arcam_av.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_ctl_bluetooth.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_ctl_oss.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_ctl_pulse.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_bluetooth.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_jack.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_oss.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_speex.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_upmix.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_usb_stream.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_vdownmix.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_samplerate.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_samplerate_best.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_samplerate_linear.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_samplerate_medium.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_samplerate_order.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_speexrate.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_speexrate_best.so
/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_rate_speexrate_medium.so
/usr/lib/x86_64-linux-gnu/libasound.so
/usr/lib/x86_64-linux-gnu/libasound.so.2
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_conf_pulse.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_arcam_av.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_bluetooth.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_oss.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_pulse.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_bluetooth.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_jack.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_oss.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_speex.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_upmix.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_usb_stream.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_vdownmix.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_samplerate.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_samplerate_best.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_samplerate_linear.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_samplerate_medium.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_samplerate_order.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_speexrate.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_speexrate_best.so
/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_rate_speexrate_medium.so
/usr/share/doc/libasound2
/usr/share/doc/libasound2-dev
/usr/share/doc/libasound2-plugins
/usr/share/doc/libasound2/NEWS.Debian.gz
/usr/share/doc/libasound2/changelog.Debian.gz
/usr/share/doc/libasound2/copyright
/usr/share/doc/libasound2/examples
/usr/share/doc/libasound2/examples/asoundrc.txt.gz
/usr/share/doc/libasound2-plugins/README-arcam-av
/usr/share/doc/libasound2-plugins/README-jack
/usr/share/doc/libasound2-plugins/README-maemo.gz
/usr/share/doc/libasound2-plugins/README-pcm-oss
/usr/share/doc/libasound2-plugins/README-pulse
/usr/share/doc/libasound2-plugins/a52.txt
/usr/share/doc/libasound2-plugins/changelog.Debian.gz
/usr/share/doc/libasound2-plugins/copyright
/usr/share/doc/libasound2-plugins/examples
/usr/share/doc/libasound2-plugins/lavcrate.txt
/usr/share/doc/libasound2-plugins/samplerate.txt
/usr/share/doc/libasound2-plugins/speexdsp.txt
/usr/share/doc/libasound2-plugins/speexrate.txt
/usr/share/doc/libasound2-plugins/upmix.txt
/usr/share/doc/libasound2-plugins/vdownmix.txt
/usr/share/doc/libasound2-plugins/examples/a52.conf_pulse
/usr/share/doc/libasound2-plugins/examples/asound.conf_jack
/usr/share/doc/libasound2-plugins/examples/asound.conf_oss
/usr/share/local-repository/binary/lib32asound2_1.0.25-1ubuntu10_amd64.deb
/usr/src/linux-headers-3.2.0-23/include/linux/ultrasound.h
/usr/src/linux-headers-3.2.0-23/include/sound/asound.h
/usr/src/linux-headers-3.2.0-23/include/sound/asound_fm.h
/usr/src/linux-headers-3.2.0-23/include/sound/asoundef.h
/usr/src/linux-headers-3.2.0-23/sound/oss/dmasound
/usr/src/linux-headers-3.2.0-23/sound/oss/dmasound/Kconfig
/usr/src/linux-headers-3.2.0-23/sound/oss/dmasound/Makefile
/usr/src/linux-headers-3.2.0-23-generic/include/linux/ultrasound.h
/var/cache/apt/archives/libasound2-dev_1.0.25-1ubuntu10.1_amd64.deb
/var/lib/alsa/asound.state
/var/lib/dpkg/info/libasound2-dev.list
/var/lib/dpkg/info/libasound2-dev.md5sums
/var/lib/dpkg/info/libasound2-dev.postinst
/var/lib/dpkg/info/libasound2-plugins:amd64.list
/var/lib/dpkg/info/libasound2-plugins:amd64.md5sums
/var/lib/dpkg/info/libasound2-plugins:i386.list
/var/lib/dpkg/info/libasound2-plugins:i386.md5sums
/var/lib/dpkg/info/libasound2:amd64.list
/var/lib/dpkg/info/libasound2:amd64.md5sums
/var/lib/dpkg/info/libasound2:amd64.postinst
/var/lib/dpkg/info/libasound2:amd64.postrm
/var/lib/dpkg/info/libasound2:amd64.preinst
/var/lib/dpkg/info/libasound2:amd64.shlibs
/var/lib/dpkg/info/libasound2:amd64.symbols
/var/lib/dpkg/info/libasound2:i386.list
/var/lib/dpkg/info/libasound2:i386.md5sums
/var/lib/dpkg/info/libasound2:i386.postinst
/var/lib/dpkg/info/libasound2:i386.postrm
/var/lib/dpkg/info/libasound2:i386.preinst
/var/lib/dpkg/info/libasound2:i386.shlibs
/var/lib/dpkg/info/libasound2:i386.symbols

如何使setup.py找到库。有什么我遗漏的吗?
我见过http://forum.ubuntu-fr.org/viewtopic.php?pid=3748397scikits.audiolab on Ubuntu Oneiric - ImportError: No module named _sndfile
这真是太麻烦了
更新
在我的一台电脑中,完全卸载scikits audiolab和alsa,然后在重新安装alsa和scikits audiolab之前更新apt-get时,此错误被删除。

最佳答案

以下是我在Ubuntu上使用alsa音频后端的原因。
按照http://cournape.github.io/audiolab/installing.html#installation-from-sources中的说明,安装alsa头:

$ sudo apt-get install libasound2-dev

在源目录中,
/路径/scikits.audiolab-0.11.0/
或者,如果使用pip(source默认下载到/tmp)
/tmp/pip构建/scikits.audiolab
创建site.cfg文件,除了[sndfile]部分之外,还创建一个[alsa]部分:
[sndfile]
include_dirs = /usr/include
library_dirs = /usr/lib/x86_64-linux-gnu/
[alsa]
include_dirs = /usr/include/alsa
library_dirs = /usr/lib/x86_64-linux-gnu

使用locate或apt file list查找asoundlib.h(包含目录)和libasound.so(库目录)在系统中的位置。
好吧,在做了这些并试图重新安装之后,它仍然没有工作。我一直收到同样令人沮丧的信息:
SndfileInfo:
  FOUND:
    libraries = ['sndfile']
    library_dirs = ['/usr/lib/x86_64-linux-gnu']
    include_dirs = ['/usr/include']

AlsaInfo:
  alsa not found
scikits/audiolab/soundio/setup.py:21: UserWarning: Alsa not found - alsa backend not build
  warnings.warn("Alsa not found - alsa backend not build")

所以,我不得不用这个方法。打开文件/path to/scikits.audiolab-0.11.0/scikits/audiolab/soundio/setup.py并替换
14 alsa_info = info_factory('alsa', ['asound'], ['alsa/asoundlib.h'],
15                          classname='AlsaInfo')()

具有
alsa_info = info_factory('alsa', ['asound'], ['asoundlib.h'],
                         classname='AlsaInfo')()

如果这对更多人有效,我们可以要求David Cournapeau(scikits.audiolab author)制作此修补程序。

关于python - scikits audiolab安装错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14286409/

10-11 07:40