urinieto / msaf-gpl

Algorithms for MSAF published under a GPL license
GNU General Public License v2.0
8 stars 2 forks source link

installation error #2

Open mmelero96 opened 6 years ago

mmelero96 commented 6 years ago

Hello, I'm trying to install the program in my Mac computer and keep running into this error:

-fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/C/umfpack.c -o build/temp.macosx-10.9-x86_64-3.7/src/C/umfpack.o
    src/C/umfpack.c:23:10: fatal error: 'umfpack.h' file not found
    #include "umfpack.h"
             ^~~~~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/Users/melero/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h1/9ys4ldd91pj169nss0s87d600000gn/T/pip-install-xy8t2hrz/cvxopt/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/h1/9ys4ldd91pj169nss0s87d600000gn/T/pip-record-sjlim1u7/install-record.txt --single-version-externally-managed --compile --install-headers /Users/melero/env/bin/../include/site/python3.7/cvxopt" failed with error code 1 in /private/var/folders/h1/9ys4ldd91pj169nss0s87d600000gn/T/pip-install-xy8t2hrz/cvxopt/

Do you know why this happens?

Thanks!

urinieto commented 6 years ago

Weird, this seems like a cvxopt problem (one of the MSAF dependencies). Seems like this might be able to help: https://github.com/cvxopt/cvxopt/issues/78#issuecomment-263962654

Alternatively, pip install msaf seems to work for me in a fresh Anaconda install on OSX.

Let me know if this helps.

mmelero96 commented 6 years ago

Thanks for this! it worked :) then I was trying to run the sample script, and run into this:

Traceback (most recent call last):
  File "msaf.py", line 2, in <module>
    import msaf
  File "/Users/melero/Documents/msaf.py", line 15, in <module>
    boundaries, labels = msaf.process(audio_file)
AttributeError: module 'msaf' has no attribute 'process'
urinieto commented 6 years ago

Glad that worked! Re new issue: you named your file msaf.py, so when you do import msaf, it will import itself. Please, rename your file to something else (e.g., msaf_example.py) and try again.

surajsonee commented 5 years ago

Hello sir, I am getting error (below error is mentioned) when run this command: pip install -e .

Running setup.py develop for msaf ERROR: Command errored out with exit status 1: command: /home/seema/work/Nic/msaf/emv/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/seema/work/Nic/msaf/setup.py'"'"'; file='"'"'/home/seema/work/Nic/msaf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: /home/seema/work/Nic/msaf/ Complete output (155 lines): running develop running egg_info writing requirements to msaf.egg-info/requires.txt writing msaf.egg-info/PKG-INFO writing top-level names to msaf.egg-info/top_level.txt writing dependency_links to msaf.egg-info/dependency_links.txt reading manifest file 'msaf.egg-info/SOURCES.txt' writing manifest file 'msaf.egg-info/SOURCES.txt' running build_ext building 'msaf/algorithms/cc/cc_segmenter' extension C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC

compile options: '-Imsaf/algorithms/cc/dsp/segmentation -Imsaf/algorithms/cc/ -Imsaf/algorithms/cc/include -I/home/seema/work/Nic/msaf/emv/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -I/usr/include/python2.7 -c'
extra options: '-std=c++11 -DUSE_PTHREADS'
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/chromagram/Chromagram.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
msaf/algorithms/cc/dsp/chromagram/Chromagram.cpp: In member function ‘double* Chromagram::process(const double*)’:
msaf/algorithms/cc/dsp/chromagram/Chromagram.cpp:137:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < m_frameSize; ++i) {
                     ~~^~~~~~~~~~~~~
msaf/algorithms/cc/dsp/chromagram/Chromagram.cpp: In member function ‘double* Chromagram::process(const double*, const double*)’:
msaf/algorithms/cc/dsp/chromagram/Chromagram.cpp:159:12: warning: unused variable ‘cmax’ [-Wunused-variable]
     double cmax = 0.0;
            ^~~~
msaf/algorithms/cc/dsp/chromagram/Chromagram.cpp:160:12: warning: unused variable ‘cval’ [-Wunused-variable]
     double cval = 0;
            ^~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/segmentation/Segmenter.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
msaf/algorithms/cc/dsp/segmentation/Segmenter.cpp: In function ‘std::ostream& operator<<(std::ostream&, const Segmentation&)’:
msaf/algorithms/cc/dsp/segmentation/Segmenter.cpp:23:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < s.segments.size(); i++)
                  ~~^~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/onsets/DetectionFunction.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
msaf/algorithms/cc/dsp/onsets/DetectionFunction.cpp: In member function ‘double DetectionFunction::process(const double*)’:
msaf/algorithms/cc/dsp/onsets/DetectionFunction.cpp:105:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (actualLength != m_dataLength) {
         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
msaf/algorithms/cc/dsp/onsets/DetectionFunction.cpp:108:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = actualLength/2; i < m_dataLength/2; ++i) {
                                      ~~^~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/base/Pitch.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc: msaf/algorithms/cc/maths/MathUtilities.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
msaf/algorithms/cc/maths/MathUtilities.cpp: In static member function ‘static double MathUtilities::mean(const std::vector<double>&, unsigned int, unsigned int)’:
msaf/algorithms/cc/maths/MathUtilities.cpp:158:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < count; ++i)
                     ~~^~~~~~~
msaf/algorithms/cc/maths/MathUtilities.cpp: In static member function ‘static void MathUtilities::getFrameMinMax(const double*, unsigned int, double*, double*)’:
msaf/algorithms/cc/maths/MathUtilities.cpp:170:12: warning: unused variable ‘a’ [-Wunused-variable]
     double a=0.0;
            ^
msaf/algorithms/cc/maths/MathUtilities.cpp: In static member function ‘static void MathUtilities::normalise(std::vector<double>&, MathUtilities::NormaliseType)’:
msaf/algorithms/cc/maths/MathUtilities.cpp:320:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < data.size(); ++i) sum += data[i];
                         ~~^~~~~~~~~~~~~
msaf/algorithms/cc/maths/MathUtilities.cpp:322:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = 0; i < data.size(); ++i) data[i] /= sum;
                             ~~^~~~~~~~~~~~~
msaf/algorithms/cc/maths/MathUtilities.cpp:330:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < data.size(); ++i) {
                         ~~^~~~~~~~~~~~~
msaf/algorithms/cc/maths/MathUtilities.cpp:334:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = 0; i < data.size(); ++i) data[i] /= max;
                             ~~^~~~~~~~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/maths/Correlation.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/transforms/FFT.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc: msaf/algorithms/cc/maths/pca/pca.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
msaf/algorithms/cc/maths/pca/pca.c: In function ‘pca_project’:
msaf/algorithms/cc/maths/pca/pca.c:255:22: warning: unused variable ‘symmat2’ [-Wunused-variable]
  double  **symmat, **symmat2, *evals, *interm;
                      ^~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/main.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/seema/work/Nic/msaf/emv/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1816:0,
                 from /home/seema/work/Nic/msaf/emv/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/seema/work/Nic/msaf/emv/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from msaf/algorithms/cc/main.cpp:13:
/home/seema/work/Nic/msaf/emv/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/segmentation/cluster_melt.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
msaf/algorithms/cc/dsp/segmentation/cluster_melt.c: In function ‘cluster_melt’:
msaf/algorithms/cc/dsp/segmentation/cluster_melt.c:46:33: warning: variable ‘B’ set but not used [-Wunused-but-set-variable]
  int i, j, a, b, b0, b1, limit, B, it, maxiter, maxiter0, maxiter1;
                                 ^
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp: In member function ‘virtual void ClusterMeltSegmenter::segment()’:
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp:155:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (features.size() < histogramLength) return;
         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp:162:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < features.size(); i++)
                     ~~^~~~~~~~~~~~~~~~~
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp:166:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < features[0].size(); j++)
                             ~~^~~~~~~~~~~~~~~~~~~~
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp:195:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < features.size(); i++)
                     ~~^~~~~~~~~~~~~~~~~
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp: In member function ‘void ClusterMeltSegmenter::makeSegmentation(int*, int)’:
msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.cpp:239:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < annotBounds.size() - 1; i++) {
                         ~~^~~~~~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/chromagram/ConstantQ.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/phasevocoder/PhaseVocoder.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/segmentation/cluster_segmenter.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/mfcc/MFCC.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc: msaf/algorithms/cc/maths/CosineDistance.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
msaf/algorithms/cc/maths/CosineDistance.cpp: In member function ‘double CosineDistance::distance(const std::vector<double>&, const std::vector<double>&)’:
msaf/algorithms/cc/maths/CosineDistance.cpp:37:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0; i<v1.size(); i++)
                      ~^~~~~~~~~~
x86_64-linux-gnu-gcc: msaf/algorithms/cc/hmm/hmm.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
In file included from msaf/algorithms/cc/hmm/hmm.c:21:0:
msaf/algorithms/cc/include/clapack.h:38:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 typedef   __CLPK_logical  (*__CLPK_L_fp)();
 ^~~~~~~
msaf/algorithms/cc/include/clapack.h:5258:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 __CLPK_doublereal dsecnd_();
 ^~~~~~~~~~~~~~~~~
msaf/algorithms/cc/include/clapack.h:5268:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 __CLPK_doublereal second_();
 ^~~~~~~~~~~~~~~~~
msaf/algorithms/cc/hmm/hmm.c: In function ‘gauss’:
msaf/algorithms/cc/hmm/hmm.c:752:9: warning: unused variable ‘j’ [-Wunused-variable]
  int i, j;
         ^
msaf/algorithms/cc/hmm/hmm.c: In function ‘loggauss’:
msaf/algorithms/cc/hmm/hmm.c:773:9: warning: unused variable ‘j’ [-Wunused-variable]
  int i, j;
         ^
x86_64-linux-gnu-gcc: msaf/algorithms/cc/dsp/rateconversion/Decimator.cpp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/msaf/algorithms/cc/base/Pitch.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/chromagram/Chromagram.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/chromagram/ConstantQ.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/mfcc/MFCC.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/onsets/DetectionFunction.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/phasevocoder/PhaseVocoder.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/rateconversion/Decimator.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/cluster_melt.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/cluster_segmenter.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/Segmenter.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/transforms/FFT.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/hmm/hmm.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/Correlation.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/CosineDistance.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/MathUtilities.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/pca/pca.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/main.o -lstdc++ -o build/lib.linux-x86_64-2.7/msaf/algorithms/cc/cc_segmenter.so -llapack -lblas -lm
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
error: Command "x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/msaf/algorithms/cc/base/Pitch.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/chromagram/Chromagram.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/chromagram/ConstantQ.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/mfcc/MFCC.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/onsets/DetectionFunction.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/phasevocoder/PhaseVocoder.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/rateconversion/Decimator.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/cluster_melt.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/ClusterMeltSegmenter.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/cluster_segmenter.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/segmentation/Segmenter.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/dsp/transforms/FFT.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/hmm/hmm.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/Correlation.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/CosineDistance.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/MathUtilities.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/maths/pca/pca.o build/temp.linux-x86_64-2.7/msaf/algorithms/cc/main.o -lstdc++ -o build/lib.linux-x86_64-2.7/msaf/algorithms/cc/cc_segmenter.so -llapack -lblas -lm" failed with exit status 1
----------------------------------------

Rolling back uninstall of msaf Moving to /home/seema/work/Nic/msaf/emv/lib/python2.7/site-packages/msaf-0.1.70.dist-info/ from /home/seema/work/Nic/msaf/emv/lib/python2.7/site-packages/~saf-0.1.70.dist-info Moving to /home/seema/work/Nic/msaf/emv/lib/python2.7/site-packages/msaf/ from /home/seema/work/Nic/msaf/emv/lib/python2.7/site-packages/~saf Moving to /home/seema/work/Nic/msaf/emv/msaf/algorithms/olda/models/ from /home/seema/work/Nic/msaf/emv/msaf/algorithms/olda/~odels ERROR: Command errored out with exit status 1: /home/seema/work/Nic/msaf/emv/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/seema/work/Nic/msaf/setup.py'"'"'; file='"'"'/home/seema/work/Nic/msaf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

urinieto commented 5 years ago

Seems like you're missing Lapack and Blas libraries. You can follow this little guide if you're using linux: https://coral.ise.lehigh.edu/jild13/2016/07/27/install-lapack-and-blas-on-linux-based-systems/