简体   繁体   English

在osx上链接到python2.6中的audiolab

[英]linking to audiolab in python2.6 on osx

I've been unable to get scikits.audiolab working on OS X. I've tried easy_install and building from source, but both give me the same error: 我一直无法在OS X上使用scikits.audiolab 。我尝试了easy_install并从源代码构建,但是两者都给了我相同的错误:

----> 1 import scikits.audiolab

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scikits.audiolab-0.11.0-py2.6-macosx-10.3-fat.egg/scikits/audiolab/__init__.py in <module>()
     23 __version__ = _version
     24 
---> 25 from pysndfile import formatinfo, sndfile
     26 from pysndfile import supported_format, supported_endianness, \
     27                       supported_encoding, PyaudioException, \

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scikits.audiolab-0.11.0-py2.6-macosx-10.3-fat.egg/scikits/audiolab/pysndfile/__init__.py in <module>()
----> 1 from _sndfile import Sndfile, Format, available_file_formats, \
      2         available_encodings, sndfile_version
      3 from compat import formatinfo, sndfile, PyaudioException, PyaudioIOError
      4 from compat import supported_format, supported_endianness, supported_encoding

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scikits.audiolab-0.11.0-py2.6-macosx-10.3-fat.egg/scikits/audiolab/pysndfile/_sndfile.so, 2): Symbol not found: _sf_close
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scikits.audiolab-0.11.0-py2.6-macosx-10.3-fat.egg/scikits/audiolab/pysndfile/_sndfile.so
  Expected in: dynamic lookup

_sndfile.so is created in the location it describes, so it's some weird problem linking to it as, far as I can see. _sndfile.so是在它描述的位置创建的,据我所知,链接到它是一个奇怪的问题。 Got me stumped. 让我感到难过。 I'm on the point of abandoning audiolab. 我打算放弃audiolab。

I can't use the built in scipy method for loading wavs as it doesn't work with 24-bit WAVs. 我无法使用内置的scipy方法加载wav,因为它不适用于24位WAV。

Audiolab requires libsndfile. Audiolab需要libsndfile。 I had installed that via MacPorts, but it had built as x86_64 only by default. 我已经通过MacPorts安装了它,但是默认情况下它仅以x86_64的形式构建。

Deleting all installs and reinstalling libsndfile with the +universal flag built it as i386 and x86_64. 删除所有安装并使用+universal标志重新安装libsndfile,将其构建为i386和x86_64。

Now I could install audiolab from source and it linked properly. 现在,我可以从源代码安装audiolab,并且它可以正确链接。 :) :)

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

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