Search code examples
macospython-2.7pipscikits

how to overcome the following issue, installing scikits.audiolab?


Hello I need to use scikits.audiolab I tried to install it as follows:

MacBook-Pro:bin$ sudo pip install scikits.audiolab

However I got:

The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting scikits.audiolab
  Downloading scikits.audiolab-0.11.0.tar.gz (892kB)
    100% |████████████████████████████████| 901kB 715kB/s 
    Complete output from command python setup.py egg_info:
    SndfileInfo:
      libraries sndfile not found in /System/Library/Frameworks/Python.framework/Versions/2.7/lib
      libraries sndfile not found in /usr/local/lib
      libraries sndfile not found in /usr/lib
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-IOSZ2F/scikits.audiolab/setup.py", line 85, in <module>
        classifiers=CLASSIFIERS)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/private/tmp/pip-build-IOSZ2F/scikits.audiolab/setup.py", line 71, in configuration
        config.add_subpackage(DISTNAME)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
        caller_level = 2)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
        caller_level = caller_level + 1)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, 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 "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
        caller_level = 2)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
        caller_level = caller_level + 1)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, 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 in /private/tmp/pip-build-IOSZ2F/scikits.audiolab/

I tried:

Adolfos-MacBook-Pro:bin$ pip install --upgrade pip
Requirement already up-to-date: pip in /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg

and then I tried again as follows:

Adolfos-MacBook-Pro:bin$ sudo pip install scikits.audiolab
The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/adolfocamachogonzalez/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting scikits.audiolab
  Downloading scikits.audiolab-0.11.0.tar.gz (892kB)
    100% |████████████████████████████████| 901kB 1.1MB/s 
    Complete output from command python setup.py egg_info:
    SndfileInfo:
      libraries sndfile not found in /System/Library/Frameworks/Python.framework/Versions/2.7/lib
      libraries sndfile not found in /usr/local/lib
      libraries sndfile not found in /usr/lib
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-KVVKKd/scikits.audiolab/setup.py", line 85, in <module>
        classifiers=CLASSIFIERS)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/private/tmp/pip-build-KVVKKd/scikits.audiolab/setup.py", line 71, in configuration
        config.add_subpackage(DISTNAME)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
        caller_level = 2)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
        caller_level = caller_level + 1)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, 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 "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 966, in add_subpackage
        caller_level = 2)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 935, in get_subpackage
        caller_level = caller_level + 1)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/misc_util.py", line 872, 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 in /private/tmp/pip-build-KVVKKd/scikits.audiolab/

So I would like to appreciate support to overcome this issue, thanks for the support,


Solution

  • as the message suggest:

    If executing pip with sudo, you may want sudo's -H flag.

    that is,

    sudo -H pip install scikits.audiolab
    

    I got the some message and after adding -H that message disappeared.