<p>我也遇到了同样的问题,并且能够解决它。在</p>
<p>从你的问题来看,我不能百分之百地确定你的问题是什么——然而,这是你或其他人可能有的几个罪魁祸首。在</p>
<p>我也在使用python2.7,并希望在IPython/Jupyter笔记本环境中使用Essentia。在</p>
<h2>1。Essentia位置</h2>
<p>这是我对你的问题的第一个猜测。</em></p>
<p>如果您能够成功地配置和安装Essentia(否则请参见下文),那么安装Essentia Python文件的路径可能是<code>/usr/local/lib/python2.7/site-packages</code>或类似的路径,而Python并不在那里。你一定要加上</p>
<pre><code>import sys
sys.path.append("/usr/local/lib/python2.7/site-packages")
</code></pre>
<p>到Python脚本的开头。在</p>
<h2>这帮我解决了这个问题</h2>
<p>您还可以将以下行添加到<code>~/.bash_profile</code>:</p>
^{pr2}$
<p>为了避免将此路径添加到您希望使用Essentia的每个Python文件/笔记本中。在</p>
<h2>2。配置和安装</h2>
<p><em>如果您能够成功配置和安装Essentia,请跳过此步骤。在我最终得到<code>install finished successfully</code>消息之前,我还有其他值得注意的问题。</em></p>
<p>如OP所述,主要指令是<a href="http://essentia.upf.edu/documentation/installing.html" rel="nofollow">here</a>。在</p>
<h3>未找到ffftw3f或taglib</h3>
<p>我用MacPorts解决了这个问题:</p>
<pre><code>sudo port install fftw-3-single
sudo port install taglib
</code></pre>
<h3>安装失败</h3>
<P>我应该注意到,在安装过程中,我有一些问题,通过移除这些和其他一些来自配置行(<a href="https://github.com/MTG/essentia/issues/210" rel="nofollow">as this has helped other users in the past</a>):</p>,使我摆脱了C++测试、GAIa和VAMP插件支持(我不需要这些)。
<pre><code>./waf configure mode=release with-python with-examples
</code></pre>
<p>而不是</p>
<pre><code>./waf configure mode=release build-static with-python with-cpptests with-examples with-vamp with-gaia
</code></pre>
<p>这使以下错误消息消失:</p>
<pre><code>Build failed
-> task in 'standard_fadedetection' failed (exit status 1):
{task 4417706448: cxxprogram standard_fadedetection.cpp.5.o -> standard_fadedetection}
['clang++', '-stdlib=libc++', 'src/examples/standard_fadedetection.cpp.5.o', '-o', '/Users/Brecht/Downloads/essentia-2.0.1/build/src/examples/standard_fadedetection', '-Lsrc', '-lessentia', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-lfftw3f', '-lyaml', '-lavformat', '-lavcodec', '-lavutil', '-lswresample', '-lsamplerate', '-ltag']
-> task in 'streaming_extractor_freesound' failed (exit status 1):
{task 4417783952: cxxprogram FreesoundExtractor.cpp.22.o,FreesoundLowlevelDescriptors.cpp.22.o,FreesoundRhythmDescriptors.cpp.22.o,FreesoundSfxDescriptors.cpp.22.o,FreesoundTonalDescriptors.cpp.22.o,streaming_extractor_freesound.cpp.22.o -> streaming_extractor_freesound}
['clang++', '-stdlib=libc++', 'src/examples/freesound/FreesoundExtractor.cpp.22.o', 'src/examples/freesound/FreesoundLowlevelDescriptors.cpp.22.o', 'src/examples/freesound/FreesoundRhythmDescriptors.cpp.22.o', 'src/examples/freesound/FreesoundSfxDescriptors.cpp.22.o', 'src/examples/freesound/FreesoundTonalDescriptors.cpp.22.o', 'src/examples/streaming_extractor_freesound.cpp.22.o', '-o', '/Users/Brecht/Downloads/essentia-2.0.1/build/src/examples/streaming_extractor_freesound', '-Lsrc', '-lessentia', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-L/opt/local/lib', '-lfftw3f', '-lyaml', '-lavformat', '-lavcodec', '-lavutil', '-lswresample', '-lsamplerate', '-ltag']
</code></pre>
<p>让我知道这是怎么回事-我有一种感觉,我对你可能遇到的所有错误都已经有了感觉。在</p>
<p>(<strong>确认:</strong><em>我之所以能这么快解决这个问题的主要原因是<a href="https://github.com/MTG/essentia/issues/113" rel="nofollow">this thread</a>-这也要归功于<a href="https://twitter.com/djmoffat" rel="nofollow">@djmoffat</a>和{a5}。</em>)</p>