Python audiolab install, unable to install (or find) libsndfile on Mac OSX
Asked Answered
S

3

6

Trying to install scikits.audiolab-0.11.0 on Mac, bit it requires libsndfile: http://www.mega-nerd.com/libsndfile/. I did install libsndfile supposedly, using libsndfile_python-1.0.0-py2.7-macosx10.5.mpkg, but the audiolab setup gives an error: libsndfile library not found. The error from the audiolab installer is below. It suggests that the location of the libsndfile can be specified in the site.cfg.

My inexperience with these type of installs are getting in the way of understanding this. Can anyone offer some advice on how to get this done?, or answer my questions below?

  • If the libsndfile was installed, where would it be, so I can specify the location? Else how to install it properly?
  • What is the site.cfg file? I see a site.cfg.bdist_wininst, and a site.cfg.win32 in the scikits.audiolab-0.11.0 folder that I downloaded.
  • What is meant by "specified in the site.cfg file in section [sndfile]" (see error below). Does this mean that I should replace the word "sndfile" with the /path/to/libsndfile between the brackets?

By the way, I checked in my /usr/lib dir and there is no libsndfile. I take it that there is where the audiolab setup will look for the file, by default.

Thanks for reading, and any help.

Error from audiolab installer:

numpy.distutils.system_info.NotFoundError: sndfile (http://www.mega-nerd.com/libsndfile/) library not found.
Directories to search for the libraries can be specified in the
site.cfg file, in section [sndfile].
Soluk answered 22/12, 2012 at 3:23 Comment(1)
I don't know much about OSX, but for the install location, you may want to check this question. To find site.cfg, you may do find / -name site.cfg in a console, but it should probably be near your python libraries. Also, the "[sndfile] section" comment indicates you're dealing with a INI file, which may have several sections, with section names in bracketsHagi
S
8

libsndfile_python sounds like a binding to libsndfile rather than libsndfile itself. You probably do not have libsndfile installed. It should, however, be quite easy to install if you already have the developer tools installed:

  1. First, download the latest source.
  2. Unpack it somewhere.
  3. Open Terminal and cd to the directory you unpacked.
  4. Configure it: ./configure
  5. Build it: make -j8
  6. Install it (requires administrative rights): sudo make -j8 install

You can then delete the directory you unpacked, but you may want to keep it for easy uninstallation.

Southwesterly answered 22/12, 2012 at 3:33 Comment(0)
E
7

To install libdsnd in a mac (Tested in a Yosemite 10.10.3):

1- Install Homebrew (paste this on a terminal):

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2- Install libsnd:

    brew install libsndfile

3- Link libsnd:

    brew link --overwrite libsndfile

4- Install scikits.audiolab:

    sudo easy_install scikits.audiolab

There you go!

Edwardedwardian answered 15/4, 2015 at 8:36 Comment(1)
I used brew to install libsndfile, then pip/pip3 to install scikits.audiolabRigadoon
A
1

For windows users: Download file :

"scikits.audiolab‑0.11.0‑cp27‑cp27m‑win32.whl"

from "https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab" Install it using command : pip install scikits.audiolab‑0.11.0‑cp27‑cp27m‑win32.whl

install libsndfile from http://www.mega-nerd.com/libsndfile/ using setup:

http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28-w32-setup.exe

copy "libsndfile-1.dll" from C:\Program Files (x86)\Mega-Nerd\libsndfile\bin to folder Lib\site-packages\scikits\audiolab folder within your Python installation folder, ex: C:\Python2711\Lib\site-packages\scikits\audiolab

For me this solved a problem. Credits to "https://github.com/cournape/audiolab/issues/7" - "samuelgarcia"

Applied answered 22/2, 2019 at 14:16 Comment(3)
The question was about installing libsndfile on Mac, not a PC with Windows.Intolerant
this result comes out when you search for a solution in windows platforms too. That's why I have especially mentioned that.Applied
This solution works for Windows. It was useful for me.Corpsman

© 2022 - 2024 — McMap. All rights reserved.