gpt4 book ai didi

python - scikits audiolab 安装错误

转载 作者:太空宇宙 更新时间:2023-11-04 09:04:32 25 4
gpt4 key购买 nike

我正在使用 mint 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=3748397scikits.audiolab on Ubuntu Oneiric - ImportError: No module named _sndfile

这引起了很多挫败感

更新

在我的一台 PC 中,完全卸载 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

在源目录中,

/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 list 查找 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")

所以,我不得不使用这个 hack。打开文件/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 作者)制作这个补丁。

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com