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

2024/4/15 1:45:46

Trying to install scikits.audiolab-0.11.0 on Mac, bit it requires 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 ( library not found.
Directories to search for the libraries can be specified in the
site.cfg file, in section [sndfile].

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.

Related Q&A

Connecting to events of another widget

This is most likely a duplicate question, but I have to ask it because other answers arent helping in my case, since I am new to pyqt (switched from tkinter few days ago).I am wondering if is it possib…

Diff multidimensional dictionaries in python

I have two dictionariesa = {home: {name: Team1, score: 0}, away: {name: Team2, score: 0}} b = {home: {name: Team1, score: 2}, away: {name: Team2, score: 0}}The keys never change but I want to get that …

Pandas DatetimeIndex vs to_datetime discrepancies

Im trying to convert a Pandas Series of epoch timestamps to human-readable times. There are at least two obvious ways to do this: pd.DatetimeIndex and pd.to_datetime(). They seem to work in quite dif…

Slicing a circle in equal segments, Python

I have a set of close of 10,000 points on the sky. They are plotted using the RA (right ascension) and DEC (declination) on the sky. When plotted, they take the shape of a circle. What I would like to …

Pyautogui screenshot. Where does it go? How to save and find later?

I am learning from Al Sweigarts you tube video for automating the boring stuff. I got to the part of taking screenshots. He didnt really explain in his video so I tested things out. I found that it tak…

How to get pip to point to newer version of Python

I have two versions of Python installed on my centOS server. [ethan@demo ~]$ python2.6 --version Python 2.6.6 [ehtan@demo ~]$ python --version Python 2.7.3The older version (2.6) is required by some es…

Connect JS client with Python server

Im relatively new to JS and Python, so this is probably a beginners question. Im trying to send a string from a JS client to Python Server (and then send the string to another Python client).This is my…

Pip does not acknowledge Cython

I just installed pip and Python via home-brew on a fresh Mac OS installation.First of all, my pip is not installing dependencies at all - which forces me to re-run pip install tables 3 times and every …

Is it me or is pygame.key.get_pressed() not working?

okay, so I am making a basic space-ship game.I cant get rotation to work because it scrambles the bitmap, but thats for another question.Should I even use a gif? any other filetype suggestions?back t…

Find out if a python script is running in IDLE or terminal/command prompt

Is there a way to find out if the python script is running in the IDLE interpreter or the terminal?Works cross-platform if possible, or if needed a different way for each platform.Work with Python 2 a…