CPJKU / madmom

Python audio and music signal processing library
https://madmom.readthedocs.io
Other
1.28k stars 201 forks source link

Can't install Madmom #478

Open turismo444 opened 3 years ago

turismo444 commented 3 years ago

Can someone help me? Tried it with various Python Versions I already installed Visual Studio Build Tools 2019

C:\WINDOWS\system32>pip install madmom Collecting madmom Using cached https://files.pythonhosted.org/packages/c7/a3/9f3de3e8068a3606331134d96b84c8db4f7624d6715be8ab3c1f56e6731d/madmom-0.16.1.tar.gz Requirement already satisfied: numpy>=1.13.4 in c:\users\ilker\appdata\local\programs\python\python36\lib\site-packages (from madmom) (1.19.5) Requirement already satisfied: scipy>=0.16 in c:\users\ilker\appdata\local\programs\python\python36\lib\site-packages (from madmom) (1.5.4) Requirement already satisfied: cython>=0.25 in c:\users\ilker\appdata\local\programs\python\python36\lib\site-packages (from madmom) (0.29.23) Requirement already satisfied: mido>=1.2.8 in c:\users\ilker\appdata\local\programs\python\python36\lib\site-packages (from madmom) (1.2.10) Installing collected packages: madmom Running setup.py install for madmom ... error Complete output from command c:\users\ilker\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Ilker\AppData\Local\Temp\pip-install-h6dahoph\madmom\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Ilker\AppData\Local\Temp\pip-record-t5gnboym\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\madmom copying madmom\conftest.py -> build\lib.win-amd64-3.6\madmom copying madmom\processors.py -> build\lib.win-amd64-3.6\madmom copying madmom__init.py -> build\lib.win-amd64-3.6\madmom creating build\lib.win-amd64-3.6\madmom\audio copying madmom\audio\chroma.py -> build\lib.win-amd64-3.6\madmom\audio copying madmom\audio\filters.py -> build\lib.win-amd64-3.6\madmom\audio copying madmom\audio\signal.py -> build\lib.win-amd64-3.6\madmom\audio copying madmom\audio\spectrogram.py -> build\lib.win-amd64-3.6\madmom\audio copying madmom\audio\stft.py -> build\lib.win-amd64-3.6\madmom\audio copying madmom\audio__init.py -> build\lib.win-amd64-3.6\madmom\audio creating build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\beats.py -> build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\chords.py -> build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\key.py -> build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\notes.py -> build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\onsets.py -> build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\tempo.py -> build\lib.win-amd64-3.6\madmom\evaluation copying madmom\evaluation\init__.py -> build\lib.win-amd64-3.6\madmom\evaluation creating build\lib.win-amd64-3.6\madmom\features copying madmom\features\beats.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\beats_hmm.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\chords.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\downbeats.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\key.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\notes.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\onsets.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\tempo.py -> build\lib.win-amd64-3.6\madmom\features copying madmom\features\init.py -> build\lib.win-amd64-3.6\madmom\features creating build\lib.win-amd64-3.6\madmom\io copying madmom\io\audio.py -> build\lib.win-amd64-3.6\madmom\io copying madmom\io\midi.py -> build\lib.win-amd64-3.6\madmom\io copying madmom\io\init.py -> build\lib.win-amd64-3.6\madmom\io creating build\lib.win-amd64-3.6\madmom\ml copying madmom\ml\crf.py -> build\lib.win-amd64-3.6\madmom\ml copying madmom\ml\gmm.py -> build\lib.win-amd64-3.6\madmom\ml copying madmom\ml\init.py -> build\lib.win-amd64-3.6\madmom\ml creating build\lib.win-amd64-3.6\madmom\models copying madmom\models\init.py -> build\lib.win-amd64-3.6\madmom\models creating build\lib.win-amd64-3.6\madmom\utils copying madmom\utils\midi.py -> build\lib.win-amd64-3.6\madmom\utils copying madmom\utils\init.py -> build\lib.win-amd64-3.6\madmom\utils creating build\lib.win-amd64-3.6\madmom\ml\nn copying madmom\ml\nn\activations.py -> build\lib.win-amd64-3.6\madmom\ml\nn copying madmom\ml\nn\layers.py -> build\lib.win-amd64-3.6\madmom\ml\nn copying madmom\ml\nn\init__.py -> build\lib.win-amd64-3.6\madmom\ml\nn copying madmom\models\LICENSE -> build\lib.win-amd64-3.6\madmom\models copying madmom\models\README.rst -> build\lib.win-amd64-3.6\madmom\models creating build\lib.win-amd64-3.6\madmom\models\beats creating build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_1.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_2.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_3.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_4.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_5.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_6.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_7.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 copying madmom\models\beats\2015\beats_blstm_8.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2015 creating build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_1.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_2.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_3.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_4.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_5.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_6.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_7.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 copying madmom\models\beats\2016\beats_lstm_8.pkl -> build\lib.win-amd64-3.6\madmom\models\beats\2016 creating build\lib.win-amd64-3.6\madmom\models\chords creating build\lib.win-amd64-3.6\madmom\models\chords\2016 copying madmom\models\chords\2016\chords_cnncrf.pkl -> build\lib.win-amd64-3.6\madmom\models\chords\2016 copying madmom\models\chords\2016\chords_cnnfeat.pkl -> build\lib.win-amd64-3.6\madmom\models\chords\2016 copying madmom\models\chords\2016\chords_dccrf.pkl -> build\lib.win-amd64-3.6\madmom\models\chords\2016 creating build\lib.win-amd64-3.6\madmom\models\chroma creating build\lib.win-amd64-3.6\madmom\models\chroma\2016 copying madmom\models\chroma\2016\chroma_dnn.pkl -> build\lib.win-amd64-3.6\madmom\models\chroma\2016 creating build\lib.win-amd64-3.6\madmom\models\downbeats creating build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_harmonic_0.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_harmonic_1.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_harmonic_2.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_harmonic_3.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_harmonic_4.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_harmonic_5.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_rhythmic_0.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_rhythmic_1.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_rhythmic_2.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_rhythmic_3.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_rhythmic_4.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_bgru_rhythmic_5.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_1.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_2.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_3.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_4.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_5.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_6.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_7.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 copying madmom\models\downbeats\2016\downbeats_blstm_8.pkl -> build\lib.win-amd64-3.6\madmom\models\downbeats\2016 creating build\lib.win-amd64-3.6\madmom\models\key creating build\lib.win-amd64-3.6\madmom\models\key\2018 copying madmom\models\key\2018\key_cnn.pkl -> build\lib.win-amd64-3.6\madmom\models\key\2018 creating build\lib.win-amd64-3.6\madmom\models\notes creating build\lib.win-amd64-3.6\madmom\models\notes\2013 copying madmom\models\notes\2013\notes_brnn.pkl -> build\lib.win-amd64-3.6\madmom\models\notes\2013 creating build\lib.win-amd64-3.6\madmom\models\onsets creating build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_1.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_2.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_3.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_4.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_5.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_6.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_7.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_brnn_8.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_cnn.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_1.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_2.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_3.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_4.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_5.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_6.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_7.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 copying madmom\models\onsets\2013\onsets_rnn_8.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2013 creating build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_1.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_2.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_3.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_4.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_5.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_6.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_7.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 copying madmom\models\onsets\2014\onsets_brnn_pp_8.pkl -> build\lib.win-amd64-3.6\madmom\models\onsets\2014 creating build\lib.win-amd64-3.6\madmom\models\patterns creating build\lib.win-amd64-3.6\madmom\models\patterns\2013 copying madmom\models\patterns\2013\ballroom_pattern_3_4.pkl -> build\lib.win-amd64-3.6\madmom\models\patterns\2013 copying madmom\models\patterns\2013\ballroom_pattern_4_4.pkl -> build\lib.win-amd64-3.6\madmom\models\patterns\2013 running build_ext building 'madmom.audio.comb_filters' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\madmom creating build\temp.win-amd64-3.6\Release\madmom\audio C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\ilker\appdata\local\programs\python\python36\lib\site-packages\numpy\core\include -Ic:\users\ilker\appdata\local\programs\python\python36\include -Ic:\users\ilker\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" /Tcmadmom/audio/comb_filters.c /Fobuild\temp.win-amd64-3.6\Release\madmom/audio/comb_filters.obj comb_filters.c c:\users\ilker\appdata\local\programs\python\python36\include\pyconfig.h(59): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "io.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe' failed with exit status 2

----------------------------------------

Command "c:\users\ilker\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Ilker\AppData\Local\Temp\pip-install-h6dahoph\madmom\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Ilker\AppData\Local\Temp\pip-record-t5gnboym\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Ilker\AppData\Local\Temp\pip-install-h6dahoph\madmom\ You are using pip version 18.1, however version 21.2.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

slewyh commented 1 year ago

Hi, I encountered similar errors trying to install on Windows:

pip install madmom

If you are getting the below error(s):

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64\\cl.exe' failed with exit code 2

This is because you're missing some C++ support needed for cython extensions in madmom. You need to follow the steps to include Build Tools for VS 2019 with additional options.

  1. Download the Build Tools for Visual Studio 2019 installer.

  2. Run the downloaded vs_buildtools.exe file, during the installation you will need to make sure you select “Desktop development with C++”, and the additional options (important!) in this screenshot: image

  3. Find out if you are running 64-bit or 32-bit Python. The building command depends on the architecture of the Python interpreter. You can check the architecture by running the following in cmd or powershell console:

    python -c "import struct; print(struct.calcsize('P') * 8)"

  4. For 64-bit Python, configure the build environment by running the following commands in cmd or an Anaconda Prompt (if you use Anaconda):

    `$ SET DISTUTILS_USE_SDK=1

$ "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64` Replace x64 by x86 to build for 32-bit Python.

  1. Try pip install madmom again.
ph-Os commented 4 months ago

@slewyh thx for the hint. I ran into exactly the same problem. I could not get step 4 to work and thus got stuck on the error that cl.exe could not be found. I resolved it with this solution: https://stackoverflow.com/questions/41724445/python-pip-on-windows-command-cl-exe-failed. The vcversall.bat you mention then gets run by just opening the visual studio native tools command prompt which can be found in the windows program menu. image