errors when installing sickits.audiolab

  python, ubuntu

I’m installing scikits.audio under Ubuntu14 by Anaconda virtual env, I have done

sudo apt-get install libsndfile-dev
sudo apt-get install libasound2-dev

and I have created a site.cfg file, which contains:

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

However, when I install the scikits.audio by source using

~/anaconda3/envs/env1/bin/python setup.py install

According to the output, both libsndfile and libasound have been found:

SndfileInfo:
customize UnixCCompiler
  FOUND:
    libraries = ['sndfile']
    library_dirs = ['/usr/lib/x86_64-linux-gnu/']
    include_dirs = ['/usr/include/']

AlsaInfo:
  FOUND:
    libraries = ['asound']
    library_dirs = ['/usr/lib/x86_64-linux-gnu/']
    include_dirs = ['/usr/include/']

However, it still have error.
At first, it looks normal:

CoreAudioInfo:
audiolab/soundio/setup.py:31: UserWarning: CoreAudio not found - CoreAudio backend not build
  warnings.warn("CoreAudio not found - CoreAudio backend not build")
running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "audiolab.pysndfile._sndfile" sources
building extension "audiolab.soundio._alsa_backend" sources
...

then it seems some files are missing:

warning: no files found matching 'scikits/audiolab/test_data/original.aif'
warning: no files found matching 'scikits/audiolab/test_data/test.aiff'
...
warning: manifest_maker: MANIFEST.in, line 19: 'recursive-include' expects <dir> <pattern1> <pattern2> ...

warning: manifest_maker: MANIFEST.in, line 20: 'recursive-include' expects <dir> <pattern1> <pattern2> ...

warning: no files found matching 'scikits/audiolab/pysndfile/_sndfile.pyx'
warning: no files found matching 'scikits/audiolab/soundio/macosx/macosx_backend.pyx'
warning: no files found matching 'scikits/audiolab/soundio/alsa/_alsa_backend.pyx'
warning: no files found matching 'scikits/audiolab/pysndfile/_sndfile.c'
warning: no files found matching 'scikits/audiolab/soundio/macosx/macosx_backend.c'
warning: no files found matching 'scikits/audiolab/soundio/alsa/_alsa_backend.c'

then things goes wrong:

packages/numpy/distutils/checks
compile options: '-I/home/songyy/anaconda3/envs/PointGNN/include/python3.7m -c'
extra options: '-march=native'
CCompilerOpt.cc_test_flags[1013] : testing flags (-O3)
C compiler: gcc -pthread -B /home/songyy/anaconda3/envs/PointGNN/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
...
gcc: audiolab/pysndfile/_sndfile.c
In file included from /home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969:0,
                 from /home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from audiolab/pysndfile/_sndfile.c:112:
/home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " 
  ^~~~~~~
audiolab/pysndfile/_sndfile.c: In function ‘__pyx_pf_7scikits_8audiolab_9pysndfile_8_sndfile_sndfile_version’:
audiolab/pysndfile/_sndfile.c:981:15: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration]
   __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               PyBytes_FromStringAndSize
audiolab/pysndfile/_sndfile.c:981:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_buff, strlen(__pyx_v_buff)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             ^
At top level:
audiolab/pysndfile/_sndfile.c:8093:13: warning: ‘__pyx_pf_5numpy_7ndarray___releasebuffer__’ defined but not used [-Wunused-function]
 static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
audiolab/pysndfile/_sndfile.c:7423:12: warning: ‘__pyx_pf_5numpy_7ndarray___getbuffer__’ defined but not used [-Wunused-function]
 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:21:0,
                 from /home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from audiolab/pysndfile/_sndfile.c:112:
/home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1464:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
 _import_array(void)
 ^~~~~~~~~~~~~
error: Command "gcc -pthread -B /home/songyy/anaconda3/envs/PointGNN/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/ -I/home/songyy/anaconda3/envs/PointGNN/lib/python3.7/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.7/numpy/distutils/include -I/home/songyy/anaconda3/envs/PointGNN/include/python3.7m -c audiolab/pysndfile/_sndfile.c -o build/temp.linux-x86_64-3.7/audiolab/pysndfile/_sndfile.o -MMD -MF build/temp.linux-x86_64-3.7/audiolab/pysndfile/_sndfile.o.d -msse -msse2 -msse3" failed with exit status 1

########### EXT COMPILER OPTIMIZATION ###########
Platform      : 
  Architecture: x64
  Compiler    : gcc

CPU baseline  : 
  Requested   : 'min'
  Enabled     : SSE SSE2 SSE3
  Flags       : -msse -msse2 -msse3
  Extra checks: none

CPU dispatch  : 
  Requested   : 'max -xop -fma4'
  Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CNL
  Generated   : none
CCompilerOpt.cache_flush[809] : write cache to path -> /home/songyy/Downloads/audiolab-master/build/temp.linux-x86_64-3.7/ccompiler_opt_cache_ext.py

Could anyone tell me why it is? thanks a million!

I have seen
scikits audiolab installation error
scikits.audiolab on Ubuntu Oneiric – ImportError: No module named _sndfile
Unfortunately, none of them worked. :<

Source: Python Questions

LEAVE A COMMENT