rtmidi-python won't work with Python3.10+ #13

Open
opened 2022-07-27 21:02:23 +02:00 by JerryLumpkins · 4 comments
JerryLumpkins commented 2022-07-27 21:02:23 +02:00 (Migrated from github.com)

The following error occurs when running:
pip3 install -r ./requirements.txt

********@mercury:~/Downloads/mpk2Editor/MPK-M2-editor$ python3 -m pip install -r ./requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting python-rtmidi
Using cached python-rtmidi-1.4.9.tar.gz (251 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-pckdl961/python-rtmidi_89d8212de8a64dc9bfe4bab75acc5966/setup.py", line 153, in
check_for_jack(define_macros, libraries)
File "/tmp/pip-install-pckdl961/python-rtmidi_89d8212de8a64dc9bfe4bab75acc5966/setup.py", line 44, in check_for_jack
res = subprocess.check_output(['pkg-config', '--modversion', 'jack'])
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 966, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This is where is went looking for an explanation:
https://stackoverflow.com/questions/71410788/pip-failed-building-wheel-for-rtmidi-python-subprocess-exited-with-error-and-le

Here's a link to the old library.
https://pypi.org/project/rtmidi-python/#history

Link to another:
https://pypi.org/project/python-rtmidi/

I may add more notes or see if I can fix this since I really enjoy using the editor.

The following error occurs when running: pip3 install -r ./requirements.txt ********@mercury:~/Downloads/mpk2Editor/MPK-M2-editor$ python3 -m pip install -r ./requirements.txt Defaulting to user installation because normal site-packages is not writeable Collecting python-rtmidi Using cached python-rtmidi-1.4.9.tar.gz (251 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-pckdl961/python-rtmidi_89d8212de8a64dc9bfe4bab75acc5966/setup.py", line 153, in <module> check_for_jack(define_macros, libraries) File "/tmp/pip-install-pckdl961/python-rtmidi_89d8212de8a64dc9bfe4bab75acc5966/setup.py", line 44, in check_for_jack res = subprocess.check_output(['pkg-config', '--modversion', 'jack']) File "/usr/lib/python3.10/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.10/subprocess.py", line 501, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.10/subprocess.py", line 966, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. This is where is went looking for an explanation: https://stackoverflow.com/questions/71410788/pip-failed-building-wheel-for-rtmidi-python-subprocess-exited-with-error-and-le Here's a link to the old library. https://pypi.org/project/rtmidi-python/#history Link to another: https://pypi.org/project/python-rtmidi/ I may add more notes or see if I can fix this since I really enjoy using the editor.
JerryLumpkins commented 2022-07-27 21:05:25 +02:00 (Migrated from github.com)

The problem is with python 3.10
The library doesn't support it.

The problem is with python 3.10 The library doesn't support it.
JerryLumpkins commented 2022-07-27 21:06:17 +02:00 (Migrated from github.com)

I'm running Ubuntu Studio 22.04

I'm running Ubuntu Studio 22.04
JerryLumpkins commented 2022-07-27 21:22:06 +02:00 (Migrated from github.com)

Installing this library seems to fix the problem.
sudo apt-get install python3-rtmidi

Installing this library seems to fix the problem. sudo apt-get install python3-rtmidi
PiOverFour commented 2022-10-18 03:27:16 +02:00 (Migrated from github.com)

Hello, thanks for the report!

I tried uninstalling the python-rtmidi from apt and installing the one from pip, and it works on my end. The old library you linked to seems to be rtmidi-python, but the one we use is python-rtmidi, so I don’t think that issue is related to yours.

Sorry I have no what went wrong, but I’m glad you could make it work :)

Leaving this issue open if anyone encounters the same issue.

Hello, thanks for the report! I tried uninstalling the `python-rtmidi` from apt and installing the one from pip, and it works on my end. The old library you linked to seems to be `rtmidi-python`, but the one we use is `python-rtmidi`, so I don’t think that issue is related to yours. Sorry I have no what went wrong, but I’m glad you could make it work :) Leaving this issue open if anyone encounters the same issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
damien/MPK-M2-editor#13
No description provided.