I'm trying to install package magenta for an university project. I can't manage to install it due to some issues with python-rtmidi setup.py installation.
When i prompt "pip install magenta" in the command line i get this error:
Running setup.py install for python-rtmidi ... error
error: subprocess-exited-with-error
× Running setup.py install for python-rtmidi did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\rtmidi
copying rtmidi\midiconstants.py -> build\lib.win-amd64-3.10\rtmidi
copying rtmidi\midiutil.py -> build\lib.win-amd64-3.10\rtmidi
copying rtmidi\release.py -> build\lib.win-amd64-3.10\rtmidi
copying rtmidi\__init__.py -> build\lib.win-amd64-3.10\rtmidi
running build_ext
building 'rtmidi._rtmidi' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__ -Isrc -IC:\Users\musilab\Desktop\magenta-music\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /EHsc /Tpsrc\RtMidi.cpp /Fobuild\temp.win-amd64-3.10\Release\src\RtMidi.obj /EHsc
RtMidi.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D__WINDOWS_MM__ -Isrc -IC:\Users\musilab\Desktop\magenta-music\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt /EHsc /Tpsrc\_rtmidi.cpp /Fobuild\temp.win-amd64-3.10\Release\src\_rtmidi.obj /EHsc
_rtmidi.cpp
src\_rtmidi.cpp(7736): error C2105: '++' richiede un l-value
src\_rtmidi.cpp(7738): error C2105: '--' richiede un l-value
src\_rtmidi.cpp(7860): error C2105: '++' richiede un l-value
src\_rtmidi.cpp(7862): error C2105: '--' richiede un l-value
src\_rtmidi.cpp(8271): error C2039: 'tp_print': non Š un membro di '_typeobject'
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\include\cpython/object.h(191): note: vedere la dichiarazione di '_typeobject'
src\_rtmidi.cpp(8284): error C2039: 'tp_print': non Š un membro di '_typeobject'
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\include\cpython/object.h(191): note: vedere la dichiarazione di '_typeobject'
src\_rtmidi.cpp(8297): error C2039: 'tp_print': non Š un membro di '_typeobject'
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\include\cpython/object.h(191): note: vedere la dichiarazione di '_typeobject'
src\_rtmidi.cpp(8599): warning C4996: 'PyEval_InitThreads': deprecated in 3.9
src\_rtmidi.cpp(9878): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
src\_rtmidi.cpp(9894): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: No metadata found in c:\users\musilab\desktop\magenta-music\lib\site-packages
Rolling back uninstall of python-rtmidi
Moving to c:\users\musilab\desktop\magenta-music\lib\site-packages\python_rtmidi-1.4.9-py3.10.egg-info
from C:\Users\musilab\Desktop\magenta-music\Lib\site-packages\~ython_rtmidi-1.4.9-py3.10.egg-info
Moving to c:\users\musilab\desktop\magenta-music\lib\site-packages\rtmidi\
from C:\Users\musilab\Desktop\magenta-music\Lib\site-packages\~tmidi
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
I think it's something related to Microsoft Build Tools but I'm not really sure about it. Can anyone help?