Essentia: "pip install essentia" does not work on macOS

Created on 5 Jul 2018  Â·  4Comments  Â·  Source: MTG/essentia

I tried pip install essentia in both python2 and python3 and did not succeed. Also, because there are no wheels for macOS it needs to compile Essentia and this takes a lot of time.

Using python 3.7 the first issue is with installing PyYaml (see https://github.com/yaml/pyyaml/issues/152). Nothing to do here on the Essentia side.

The error I got running pip install essentia (in Python 2.7.15 and Python3.7 macOS sierra) is very similar:

[...]

   Building all the algorithms
    Ignoring the following algorithms: GaiaTransform, IFFTW, MusicExtractorSVM, FFTW, IFFTA, FFTK, IFFTK, FFTA, FFTWComplex
    Created algorithms registration file

    ---------------------------------------------------------------------------------------
    - Building static library
    Static dependencies found in packaging/debian_3rdparty/lib/pkgconfig will be used for:
    - Building Python extension
    =======================================================================================
    'configure' finished successfully (1.219s)
    Waf: Entering directory `/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/build'
    → building from /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia
    → building from /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src
    Building all the algorithms
    Ignoring the following algorithms: IFFTK, IFFTW, MusicExtractorSVM, FFTW, IFFTA, FFTK, GaiaTransform, FFTA, FFTWComplex
    Created algorithms registration file
    → building from /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src/python
    Waf: Leaving directory `/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/build'
    source not found: '../essentia.pc.in' in bld(posted=True, target='', idx=2, meths=['process_rule', 'process_source'], _name='', source='../essentia.pc.in', PREFIX='tmp', VERSION='2.1-beta5-dev', LPATHS='-L/usr/local/lib -L/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/packaging/debian_3rdparty/lib', path=/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src, LFLAGS='-lavformat -liconv -lSDLmain -lSDL -lm -llzma -lavcodec -liconv -lSDLmain -lSDL -lm -llzma -lavutil -lm -lavcodec -liconv -lSDLmain -lSDL -lm -llzma -lavutil -lm -lavutil -lm -lavresample -lm -lavutil -lm -lsamplerate -ltag -lyaml -lchromaprint -lfftw3f', features=[]) in /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src
    Waf: Entering directory `/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/build'
    → building from /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia
    → building from /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src
    Building all the algorithms
    Ignoring the following algorithms: IFFTK, IFFTW, MusicExtractorSVM, FFTW, IFFTA, FFTK, GaiaTransform, FFTA, FFTWComplex
    Created algorithms registration file
    → building from /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src/python
    Waf: Leaving directory `/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/build'
    source not found: '../essentia.pc.in' in bld(posted=True, target='', idx=2, meths=['process_rule', 'process_source'], _name='', source='../essentia.pc.in', PREFIX='tmp', VERSION='2.1-beta5-dev', LPATHS='-L/usr/local/lib -L/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/packaging/debian_3rdparty/lib', path=/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src, LFLAGS='-lavformat -liconv -lSDLmain -lSDL -lm -llzma -lavcodec -liconv -lSDLmain -lSDL -lm -llzma -lavutil -lm -lavcodec -liconv -lSDLmain -lSDL -lm -llzma -lavutil -lm -lavutil -lm -lavresample -lm -lavutil -lm -lsamplerate -ltag -lyaml -lchromaprint -lfftw3f', features=[]) in /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/src
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/setup.py", line 116, in <module>
        'install_lib': EssentiaInstall
      File "/Users/ffont/Developer/Envs/Py2EssentiaTest/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/Users/ffont/Developer/Envs/Py2EssentiaTest/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 563, in run
        self.run_command('build')
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/setup.py", line 46, in run
        library = glob.glob('tmp/lib/python*/*-packages/essentia')[0]
    IndexError: list index out of range

    ----------------------------------------
Command "/Users/ffont/Developer/Envs/Py2EssentiaTest/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-record-6n0334/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ffont/Developer/Envs/Py2EssentiaTest/bin/../include/site/python2.7/essentia" failed with error code 1 in /private/var/folders/qg/wk87bkb9227f1dx0zz6w2mqw0000gn/T/pip-install-QTHMDN/essentia/
builds pip wheels

Most helpful comment

Hi @dbogdanov . Are there any plans to fix this?

All 4 comments

Works only on Linux for now!

Hi @dbogdanov . Are there any plans to fix this?

any plans to fix on MacOSX?

Is there a workaround for this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexsivris picture alexsivris  Â·  3Comments

lajash picture lajash  Â·  25Comments

iOSzhangkai picture iOSzhangkai  Â·  24Comments

aagnone3 picture aagnone3  Â·  3Comments

colonder picture colonder  Â·  7Comments