我正在使用薄荷Linux Mint 13 maya(linux 3.2.0-23-generic x86-64)
我正在尝试安装scikits.audiolab来执行一些音频信号处理。我已经下载了所有先决条件,即(python-dev python-numpy python-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")
当我'$ locate asound'时,我得到了
/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=3748397和scikits.audiolab on Ubuntu Oneiric - ImportError: No module named _sndfile
这引起了很多挫折
更新
在我的一台PC中,在完全取消安装scikits-audiolab和alsa之后删除了这个错误,然后在重新安装alsa和scikits-audiolab之前更新了apt-get。
答案 0 :(得分:3)
以下内容使得alsa音频后端在Ubuntu上为我工作。
按照http://cournape.github.io/audiolab/installing.html#installation-from-sources中的指示,安装alsa标头:
$ sudo apt-get install libasound2-dev
在源目录中,
/path-to/scikits.audiolab-0.11.0 /
或者,如果使用pip(默认情况下将源下载到/ tmp)
/tmp/pip-build/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列表查找asoundlib.h(include_dirs)和libasound.so(library_dirs)在系统中的位置。
好吧,在完成所有这些并尝试重新安装之后,它仍然无法正常工作。我不断收到同样令人沮丧的消息:
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作者)制作此补丁。