Giter VIP home page Giter VIP logo

Comments (28)

annieFromTaiwan avatar annieFromTaiwan commented on August 16, 2024 7

http://stackoverflow.com/questions/13999790/python-audiolab-install-unable-to-install-or-find-libsndfile-on-mac-osx
Do what the answer says: download, build, and install "libsndfile".
And then "sudo easy_install scikits.audiolab".

By doing above steps, I have fixed this problem on my machine.
(easy_install works but pip doesn't work)

from audiolab.

Unibrighter avatar Unibrighter commented on August 16, 2024 5

I run into this problem too on 14.04 LTS x64 Ubuntu too.

The reason for this is because for some latter versions of Linux distributions, they don't use the path for libsndfile library any longer in the way the scikits.audiolab refers to it.

The problem can be solved by @eduardoboucas or @nwjlyons approach with some tiny fixes for any other version.

  1. install libsndfile module for your OS
    sudo apt-get install libsndfile1
    sudo apt-get install libsndfile1-dev
  2. locate the file, in my case is in /usr/lib/x86_64-linux-gnu/libsndfile.so
    sudo locate libsndfile.so
  3. make that soft link and enjoy:
    sudo ln -s /usr/lib/x86_64-linux-gnu/libsndfile.so /usr/local/lib/libsndfile.so

Note: the library file name could be differnt from libsndfile.so.1 to some other variants. Make sure your soft link is valid, and the library would work out fine.

from audiolab.

cournape avatar cournape commented on August 16, 2024 2

I don't know about pip/easy_install, I don't think those tools are very reliable.

As for the standard python setup.py install, I don't understand why it does not work for you. I have just confirmed it is working on my own ubuntu vm. You could try debugging things by printing temporaries results in scikits/audiolab/soundio/setuphelp.py.

from audiolab.

samuelgarcia avatar samuelgarcia commented on August 16, 2024 2

Finally possible with:

  1. Install scikits.audiolab with that http://www.lfd.uci.edu/~gohlke/pythonlibs
  2. Install libsoundfile with that http://www.mega-nerd.com/libsndfile/#Download
  3. Copy/Paste this libsndfile-1.dll
    from C:/Program Files/Mega-Nerd/libsndfile/bin/
    to C:/Python27/Lib/site-packages/scikits/audiolab/pysndfile/

from audiolab.

cheyuanl avatar cheyuanl commented on August 16, 2024 2

Hi,

I am running on CentOS release 6.5 having the same issue couldn't find the libsndfile since I install it in a non-default folder. I solved my problem by adding a file "~/.numpy-site.cfg"
Here is the file:

[sndfile]
include_dirs = /path/to/local/include
library_dirs = /path/to/local/lib 
sndfile_libs = sndfile-1

After that I can install it using pip since now it can find the libsndfile.
pip install --user scikits.audiolab

Hope it helps.

from audiolab.

nwjlyons avatar nwjlyons commented on August 16, 2024 1

I'm on Ubuntu 11.10.

I managed to install audiolab by first locating the libsndfile.so file then symlinking it to /usr/local/lib/libsndfile.so

Locate file

locate libsndfile
/usr/lib/i386-linux-gnu/libsndfile.so.1
/usr/lib/i386-linux-gnu/libsndfile.so.1.0.24
/usr/share/doc/libsndfile1
/usr/share/doc/libsndfile1/changelog.Debian.gz
/usr/share/doc/libsndfile1/copyright
/var/lib/dpkg/info/libsndfile1:i386.list
/var/lib/dpkg/info/libsndfile1:i386.md5sums
/var/lib/dpkg/info/libsndfile1:i386.postinst
/var/lib/dpkg/info/libsndfile1:i386.postrm
/var/lib/dpkg/info/libsndfile1:i386.shlibs
/var/lib/dpkg/info/libsndfile1:i386.symbols

Symlink

sudo ln -s /usr/lib/i386-linux-gnu/libsndfile.so.1 /usr/local/lib/libsndfile.so

PIP install

pip install scikits.audiolab

from audiolab.

eduardoboucas avatar eduardoboucas commented on August 16, 2024 1

I'm having a similar issue in CentOS 5.7.

1. locate libsndfile

/usr/local/lib/libsndfile.a
/usr/local/lib/libsndfile.la
/usr/local/lib/libsndfile.so
/usr/local/lib/libsndfile.so.1
/usr/local/lib/libsndfile.so.1.0.25

2. locate sndfile.h

/usr/local/include/sndfile.h
/usr/local/include/sndfile.hh

3. python setup.py build

libraries gfortran,gfortranbegin not found in /usr/local/lib
(...)
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].

4. vim /usr/lib/python2.4/site-packages/numpy/distutils/site.cfg

[DEFAULT]
libraries = gfortran, gfortranbegin
library_dirs = /usr/local/lib:/usr/lib/gcc/i386-redhat-linux/4.1.2

I'm a bit lost here. Shouldn't site.cfg have a [sndfile] section? Other than that, I have no idea how to approach this.
Any suggestions?

Thanks!

from audiolab.

qubodup avatar qubodup commented on August 16, 2024 1

On win32 in C:\Program Files\Mega-Nerd\libsndfile, the files libsndfile-1.lib and libsndfile-1.def exist but the installation script seems to only look for libsndfile.lib and/or libsndfile.def

Full solution at https://stackoverflow.com/questions/47779548/how-does-one-install-scikits-audiolab-0-11-0-on-windows/51379107#51379107

Unfortunately this leaves me with the next error;

    creating build\temp.win32-2.7\Release\scikits\audiolab\pysndfile
    C:\Users\ESP\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG /arch:SSE2 -I"C:\Program Files\Mega-Nerd\libsndfile\include\" -Ic:\python27\lib\site-packages\numpy\core\include -Ic:\python27\include -Ic:\python27\PC /Tcscikits\audiolab\pysndfile\_sndfile.c /Fobuild\temp.win32-2.7\Release\scikits\audiolab\pysndfile\_sndfile.obj
    cl : Command line error D8003 : missing source filename
    error: Command "C:\Users\ESP\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG /arch:SSE2 -I"C:\Program Files\Mega-Nerd\libsndfile\include\" -Ic:\python27\lib\site-packages\numpy\core\include -Ic:\python27\include -Ic:\python27\PC /Tcscikits\audiolab\pysndfile\_sndfile.c /Fobuild\temp.win32-2.7\Release\scikits\audiolab\pysndfile\_sndfile.obj" failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\esp\\appdata\\local\\temp\\pip-install-dkakdy\\scikits.audiolab\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\esp\appdata\local\temp\pip-record-p369xz\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\esp\appdata\local\temp\pip-install-dkakdy\scikits.audiolab\

Next, I'm going to try installing a .whl file - as recommended earlier in this thread.

EDIT: the .whl way works:

  1. go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab
  2. ctrl+f (search on page) for audiolab
  3. Win+R / cmd.exe / cd C:\users\username\downloads\ / pip install file.whl

from audiolab.

klonuo avatar klonuo commented on August 16, 2024

Problem is with distutils. I don't have Ubuntu version of numpy but I
build it myself with Intel compilers and MKL. So it searches in
"/usr/local/...". But as I pointed in site.cfg to look in "/usr/lib/"
and "/usr/include/" I don't know why it does not search for alsa in
mentioned folders, but only for sndfile?

Here are alsa headers:

$ locate asoundlib.h
/usr/include/alsa/asoundlib.h
/usr/include/sys/asoundlib.h
/usr/src/alsa/alsa-lib-1.0.24.1/include/asoundlib.h

On Thu, Sep 1, 2011 at 10:24 AM, cournape
[email protected]
wrote:

I don't know about pip/easy_install, I don't think those tools are very reliable.

As for the standard python setup.py install, I don't understand why it does not work for you. I have just confirmed it is working on my own ubuntu vm. You could try debugging things by printing temporaries results in scikits/audiolab/soundio/setuphelp.py.

Reply to this email directly or view it on GitHub:
#7 (comment)

from audiolab.

 avatar commented on August 16, 2024

I'm getting the same problem here on ubuntu:

# pip install scikits.audiolab
Downloading/unpacking scikits.audiolab
  Downloading scikits.audiolab-0.11.0.tar.gz (892Kb): 892Kb downloaded
  Running setup.py egg_info for package scikits.audiolab
    SndfileInfo:
      libraries sndfile not found in /usr/local/lib
      libraries sndfile not found in /usr/lib
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/root/xanview2/build/scikits.audiolab/setup.py", line 85, in <module>
        classifiers=CLASSIFIERS)
      File "/usr/lib/pymodules/python2.7/numpy/distutils/core.py", line 152, in setup
        config = configuration()
      File "/root/xanview2/build/scikits.audiolab/setup.py", line 71, in configuration
        config.add_subpackage(DISTNAME)
      File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 972, in add_subpackage
        caller_level = 2)
      File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 941, in get_subpackage
        caller_level = caller_level + 1)
      File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scikits/audiolab/setup.py", line 10, in configuration
        confgr.add_subpackage('pysndfile')
      File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 972, in add_subpackage
        caller_level = 2)
      File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 941, in get_subpackage
        caller_level = caller_level + 1)
      File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scikits/audiolab/pysndfile/setup.py", line 25, in configuration
        site.cfg file, in section [sndfile].""")
    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].
    Complete output from command python setup.py egg_info:
    SndfileInfo:

  libraries sndfile not found in /usr/local/lib

  libraries sndfile not found in /usr/lib

Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/root/xanview2/build/scikits.audiolab/setup.py", line 85, in <module>

    classifiers=CLASSIFIERS)

  File "/usr/lib/pymodules/python2.7/numpy/distutils/core.py", line 152, in setup

    config = configuration()

  File "/root/xanview2/build/scikits.audiolab/setup.py", line 71, in configuration

    config.add_subpackage(DISTNAME)

  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 972, in add_subpackage

    caller_level = 2)

  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 941, in get_subpackage

    caller_level = caller_level + 1)

  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py

    config = setup_module.configuration(*args)

  File "scikits/audiolab/setup.py", line 10, in configuration

    confgr.add_subpackage('pysndfile')

  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 972, in add_subpackage

    caller_level = 2)

  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 941, in get_subpackage

    caller_level = caller_level + 1)

  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py

    config = setup_module.configuration(*args)

  File "scikits/audiolab/pysndfile/setup.py", line 25, in configuration

    site.cfg file, in section [sndfile].""")

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

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /root/.pip/pip.log

I'm guessing because ubuntu stores those libs in /usr/lib/x86_64-linux-gnu/libsndfile.so

from audiolab.

roitnedurp avatar roitnedurp commented on August 16, 2024

A simple question, I'm also in trouble with the same problem of Alsa not recognized, the kernel is: uname -r 3.1.0-1-amd64, with Debian Wheezy installed.
The fact of Alsa being build inside the kernel (Debian original) may be of some importance with that issue?

from audiolab.

EmlynC avatar EmlynC commented on August 16, 2024

I can confirm that nwjlyons solution works for Ubuntu 11.10, cheers.

from audiolab.

endolith avatar endolith commented on August 16, 2024

Same problem in Windows.

C:\Python27\Scripts>easy_install scikits.audiolab
Searching for scikits.audiolab
Reading http://pypi.python.org/simple/scikits.audiolab/
Reading http://cournape.github.com/audiolab
Reading http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/audiolab
Best match: scikits.audiolab 0.11.0
...
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].

The file it's looking for is presumably one of these:

C:\Program Files (x86)\Mega-Nerd\libsndfile\bin\libsndfile-1.dll (32-bit)

or

C:\Program Files\Mega-Nerd\libsndfile\bin\libsndfile-1.dll (64-bit)

I didn't know if I should install the 32-bit version or the 64-bit version, so I installed both. Still doesn't work. Should it be the same as the Python version? Or should it be the same as my processor?

I've always found audiolab very difficult to install and get working, whether on Windows or Linux. :/ Is there any way the install process can automatically take care of downloading the missing dependencies?

from audiolab.

samuelgarcia avatar samuelgarcia commented on August 16, 2024

Hi,
On windows, same problem as endolith with latest GIT version scikits.audiolab and a standart.
Even with a site.cfg with good localtion.
Is it a problem of version.
I have latest pythonXY with p27.

Any clue ?
If I succedd I can build winbdist if you want.

Samuel

from audiolab.

endolith avatar endolith commented on August 16, 2024

Yeah, I'm also running pythonxy 2.7.2.1

from audiolab.

endolith avatar endolith commented on August 16, 2024

Hey flacread works now! I did the above but used Link Shell Extension to produce a symlink instead of copying the file.

This is with 32-bit Python(x,y) 2.7.2.1, scikits.audiolab-0.11.0.win32-py2.7.‌exe, and libsndfile-1.0.25-w32-setup.exe

(Confirmed that the 64-bit libsndfile doesn't work. ImportError: DLL load failed: The specified module could not be found.)

from audiolab.

eduardoboucas avatar eduardoboucas commented on August 16, 2024

I fixed this by modifying my site.cfg. It is now:

[sndfile]
library_dirs = /usr/local/lib/
include_dirs = /usr/local/include/

Cheers!

from audiolab.

antiface avatar antiface commented on August 16, 2024

This is not resolved. It just happened to me earlier today. The last comment here was from 6 months ago. I tried everything mentioned, to no avail. The closest solution I found was adding the ubuntu-audio-dev ppa and installing linux-alsa-driver-modules, but this was from 2010 and there is no linux-alsa-driver-modules for 3.5.0-37-generic, the latest seems to be 3.0.

from audiolab.

blujule4218 avatar blujule4218 commented on August 16, 2024

Where is the site.cfg supposed to be? Where is the section called [sndfile]."""?

from audiolab.

Fuqran avatar Fuqran commented on August 16, 2024

Hi ,
i am having trouble setup up libsndfile for development purpose but after cloning the code and then trying to run the test given in audiolab\tests folder it always giving me error about _sndfile module not found (ImportError: No module named _sndfile)

could you help me out i want to implement special character (non ASCII /non utf-8 ) support to it ,could you also confirm that is this added to this library or not
Thanks

from audiolab.

endolith avatar endolith commented on August 16, 2024

I can't get this to install on Windows 7

What am I supposed to do with site.cfg?

This site.cfg? C:\Python27\Lib\site-packages\numpy\distutils\site.cfg

I tried adding

[sndfile]
library_dirs = C:\Program Files (x86)\Mega-Nerd\libsndfile\bin
include_dirs = C:\Program Files (x86)\Mega-Nerd\libsndfile\bin
sndfile_libs = sndfile-1

to the bottom but it doesn't work.

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

It doesn't matter if I use pip or easy_install:

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

from audiolab.

trevorKirkby avatar trevorKirkby commented on August 16, 2024

This is only vaguely related to audiolab but I have the same problem for installing scikits.samplerate on windows 7. It isn't just specific to audiolab.

from audiolab.

Fuqran avatar Fuqran commented on August 16, 2024

I used this page to install all of the libs required for this application
to run on windows, this page helped me allot
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab
let me know if this helped,
thanks

On Sat, Mar 14, 2015 at 12:15 AM, Trevor [email protected] wrote:

This is only vaguely related to audiolab but I have the same problem for
installing scikits.samplerate on windows 7. It isn't just specific to
audiolab.


Reply to this email directly or view it on GitHub
#7 (comment).

Thanks!
Furqan Wasi
Application Developer

office: 888-783-2442

[image: https://twitter.com/geekschicago] https://twitter.com/geekschicago
[image: https://www.facebook.com/geekschicago]
https://www.facebook.com/geekschicago [image:
https://www.youtube.com/channel/UCS76Te3JZO4bClkrYD3QVrA]
https://www.youtube.com/channel/UCS76Te3JZO4bClkrYD3QVrA [image:
https://www.linkedin.com/company/geekschicago-com]
https://www.linkedin.com/company/geekschicago-com
https://geekschicago.com

from audiolab.

trevorKirkby avatar trevorKirkby commented on August 16, 2024

Yes that is a very helpful site. I see that referenced so many times for package difficulties. It probably has a working executable for a given platform.

from audiolab.

endolith avatar endolith commented on August 16, 2024

Copy/Paste this libsndfile-1.dll from C:/Program Files/Mega-Nerd/libsndfile/bin/ to C:/Python27/Lib/site-packages/scikits/audiolab/pysndfile/

32-bit Python(x,y) 2.7.2.1, scikits.audiolab-0.11.0.win32-py2.7.‌exe, and libsndfile-1.0.25-w32-setup.exe

This no longer works for me. I installed libsndfile-1.0.25-w32-setup.exe and scikits.audiolab-0.11.0-cp27-none-win32.whl (or the version from PyPI, doesn't matter) and then symlinked from C:\Program Files (x86)\Mega-Nerd\libsndfile\bin\libsndfile-1.dll to C:\Python27\Lib\site-packages\scikits\audiolab\pysndfile\libsndfile-1.dll but I still get NameError: _SNDFILE_FILE_FORMAT

from audiolab.

 avatar commented on August 16, 2024

Thank you @cheyuanl it worked for me


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

from audiolab.

ngragaei avatar ngragaei commented on August 16, 2024

How can i do that? @cheyuanl

from audiolab.

zjsong avatar zjsong commented on August 16, 2024

Thanks @qubodup , your method works for me.

By the way, it seems like the version of Python should be 2.7 for this installation. For other guys encountering "error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27", a solution is to just download and install Microsoft Visual C++ Compiler for Python 2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266.

After that you may also need to upgrade setuptools package for the error to disappear:
pip install --upgrade setuptools

Hope it helps.

from audiolab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.