Hi, I get this error when trying to install the RTMIDI, anyone idea what I am doing wrong ? this blog and others didn't give me the answer yet
toonbosschaert@MacBook-Pro-2 ~ % python3 -m pip install python-rtmidi
Collecting python-rtmidi
Using cached python-rtmidi-1.4.9.tar.gz (251 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: python-rtmidi
Building wheel for python-rtmidi (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
/private/var/folders/k_/n2vwh3lj5gnfmxlggd2h4l540000gn/T/pip-install-pox97136/python-rtmidi_4217c5c70e6b4245ae228bb9c2af0e7d/setup.py:27: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
JACK1_MIN_VERSION = StrictVersion('0.125.0')
/private/var/folders/k_/n2vwh3lj5gnfmxlggd2h4l540000gn/T/pip-install-pox97136/python-rtmidi_4217c5c70e6b4245ae228bb9c2af0e7d/setup.py:28: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
JACK2_MIN_VERSION = StrictVersion('1.9.11')
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-311
creating build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/version.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/midiconstants.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/init.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/midiutil.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
running egg_info
writing python_rtmidi.egg-info/PKG-INFO
writing dependency_links to python_rtmidi.egg-info/dependency_links.txt
writing top-level names to python_rtmidi.egg-info/top_level.txt
reading manifest file 'python_rtmidi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.rst.in'
no previously-included directories found matching 'ci'
warning: no previously-included files matching 'pycache' found under directory ''
warning: no previously-included files matching '.py[co]' found under directory ''
adding license file 'LICENSE.txt'
adding license file 'AUTHORS.rst'
writing manifest file 'python_rtmidi.egg-info/SOURCES.txt'
running build_ext
building 'rtmidi.rtmidi' extension
creating build/temp.macosx-10.9-universal2-cpython-311
creating build/temp.macosx-10.9-universal2-cpython-311/src
creating build/temp.macosx-10.9-universal2-cpython-311/src/rtmidi
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -D__RTMIDI_SILENCE_WARNINGS_ -D__MACOSX_CORE__ -Isrc/rtmidi -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/_rtmidi.cpp -o build/temp.macosx-10.9-universal2-cpython-311/src/_rtmidi.o -frtti
src/_rtmidi.cpp:243:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-rtmidi
Running setup.py clean for python-rtmidi
Failed to build python-rtmidi
Installing collected packages: python-rtmidi
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
╰─> [42 lines of output]
/private/var/folders/k_/n2vwh3lj5gnfmxlggd2h4l540000gn/T/pip-install-pox97136/python-rtmidi_4217c5c70e6b4245ae228bb9c2af0e7d/setup.py:27: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
JACK1_MIN_VERSION = StrictVersion('0.125.0')
/private/var/folders/k_/n2vwh3lj5gnfmxlggd2h4l540000gn/T/pip-install-pox97136/python-rtmidi_4217c5c70e6b4245ae228bb9c2af0e7d/setup.py:28: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
JACK2_MIN_VERSION = StrictVersion('1.9.11')
running install
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-311
creating build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/version.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/midiconstants.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/init.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
copying rtmidi/midiutil.py -> build/lib.macosx-10.9-universal2-cpython-311/rtmidi
running egg_info
writing python_rtmidi.egg-info/PKG-INFO
writing dependency_links to python_rtmidi.egg-info/dependency_links.txt
writing top-level names to python_rtmidi.egg-info/top_level.txt
reading manifest file 'python_rtmidi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.rst.in'
no previously-included directories found matching 'ci'
warning: no previously-included files matching 'pycache' found under directory ''
warning: no previously-included files matching '.py[co]' found under directory ''
adding license file 'LICENSE.txt'
adding license file 'AUTHORS.rst'
writing manifest file 'python_rtmidi.egg-info/SOURCES.txt'
running build_ext
building 'rtmidi.rtmidi' extension
creating build/temp.macosx-10.9-universal2-cpython-311
creating build/temp.macosx-10.9-universal2-cpython-311/src
creating build/temp.macosx-10.9-universal2-cpython-311/src/rtmidi
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -D__RTMIDI_SILENCE_WARNINGS_ -D__MACOSX_CORE__ -Isrc/rtmidi -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/_rtmidi.cpp -o build/temp.macosx-10.9-universal2-cpython-311/src/_rtmidi.o -frtti
src/_rtmidi.cpp:243:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-rtmidi
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
toonbosschaert@MacBook-Pro-2 ~ %