Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6951741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:15:31+00:00 2026-05-27T14:15:31+00:00

Okay, so I wanted to do some basic signal processing in Python and found

  • 0

Okay, so I wanted to do some basic signal processing in Python and found this great library called scikits.audiolab.

No PPA anywhere to be found. Oh well. I thought I could install it on my Ubuntu Oneiric server by simply

sudo aptitude install libsndfile-dev

and then

sudo easy_install scikits.audiolab

This, however, failed with

error: 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].

Wtf? Okay, queried the libsndfile1-dev file list:

japsu@helios ~ $ apt-file list libsndfile1-dev
libsndfile1-dev: /usr/include/sndfile.h
libsndfile1-dev: /usr/include/sndfile.hh
libsndfile1-dev: /usr/lib/x86_64-linux-gnu/libsndfile.a
libsndfile1-dev: /usr/lib/x86_64-linux-gnu/libsndfile.la
libsndfile1-dev: /usr/lib/x86_64-linux-gnu/libsndfile.so
libsndfile1-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/sndfile.pc
[...]

Weird, libraries going into non-standard library directory? Stupid packager.

Oh well. Downloaded the source for scikits.audiolab, wrote a site.cfg like this:

[sndfile]
include_dirs = /usr/include
library_dirs = /usr/lib/x86_64-linux-gnu/
sndfile_libs = sndfile

Now python setup.py build and sudo setup.py install completed successfully.

Next, fired up a Python shell, tried to from scikits.audiolab import sndfile:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "scikits/audiolab/__init__.py", line 25, in <module>
    from pysndfile import formatinfo, sndfile
  File "scikits/audiolab/pysndfile/__init__.py", line 1, in <module>
    from _sndfile import Sndfile, Format, available_file_formats, \
ImportError: No module named _sndfile

But:

>> sys.path
['',
 '/usr/bin',
 '/usr/lib/pymodules/python2.7',
 '/usr/local/lib/python2.7/dist-packages/scikits.audiolab-0.11.0-py2.7-linux-x86_64.egg',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/IPython/Extensions',
 u'/home/japsu/.ipython']

And _sndfile.so found at /usr/local/lib/python2.7/dist-packages/scikits.audiolab-0.11.0-py2.7-linux-x86_64.egg/scikits/audiolab/pysndfile/_sndfile.so.

So, my question is,

  1. Wtf is going on? Why doesn’t python find _sndfile.so?
  2. Has anyone successfully used scikits.audiolab in 2011 on a 2011 Linux distro? How did you do it?
  3. Are there any good alternative libraries for reading HUGE (like, 10 GB / 8 hours) WAV files chunk by chunk into NumPy?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:15:32+00:00Added an answer on May 27, 2026 at 2:15 pm

    Someone suggested I check ldd _sndfile.so. Did just that and got

        linux-vdso.so.1 =>  (0x00007fffd3dea000)
        libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f2bfbb5b000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2bfb93e000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2bfb59e000)
        libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f2bfb354000)
        libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f2bfae85000)
        libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f2bfac58000)
        libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f2bfaa51000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2bfa7cd000)
    

    Interesting! A bunch of file format libraries are also referenced, ones that I probably do not have installed.

    Did sudo aptitude install flac vorbis-tools and voila!

    In [1]: from scikits.audiolab import sndfile
    /usr/local/lib/python2.7/dist-packages/scikits.audiolab-0.11.0-py2.7-linux-x86_6                                     
    4.egg/scikits/audiolab/soundio/play.py:48: UserWarning: Could not import alsa ba                                     
    ckend; most probably, you did not have alsa headers when building audiolab
    warnings.warn("Could not import alsa backend; most probably, "
    

    I can probably ignore that warning about missing ALSA support for now as it’s probably used for local recording and playback – and this is a server anyway.

    It would have been a whole lot easier if the lack of libFLAC, libvorbis and libvorbisenc had triggered a build-time failure in the build scripts of scikits.audiolab… After all, the final error message mentions nothing of those libraries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so im working on this php image upload system but for some reason
Okay, thus may seen kind of odd, but I wanted to get some suggestions
Okay, so this probably sounds terribly nefarious, but I need such capabilities for my
Okay. I know this looks like the typical Why didn't he just Google it
Okay, so I'm using perl to read in a file that contains some general
Okay, this just feels plain nasty, but I've been directed to do it, and
Okay so i just wanted to put a little search form on my site
I just wanted to confirm something if that's okay? :) I am setting up
With 'Insert' I'm totally okay with it. PHP - MongoDB inserts way I wanted
Okay, so I have this Silverlight client program. I'm not allowed to use the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.