Open 517002650 opened 2 months ago
It seems you are trying to run Python program, which uses mido. Mido can use python-rtmidi as a backend, but you have to specify, which backends to install, when you install mido:
https://mido.readthedocs.io/en/stable/installing.html#installation
Windows PowerShell 版权所有(C) Microsoft Corporation。保留所有权利。
安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows
PS C:\Users\Administrator\PycharmProjects\pythonProject8> pip install python-rtmidi Collecting python-rtmidi Using cached python_rtmidi-1.5.8.tar.gz (368 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [31 lines of output]
meson setup C:\Users\Administrator\AppData\Local\Temp\pip-install-dpwhp3jo\python-rtmidi_ea628cd1b6f0485b9bc34b5424db72f3 C:\Users\Administrator\AppData\Local\Temp\pip-install-dpwhp3jo\python-rtmidi_ea628cd1b6f0485b9bc34b5424db72f3.mesonpy-j1o6d2ql -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dverbose=false -Dbuildtype=plain --native-file=C:\Users\Administrator\AppData\Local\Temp\pip-install-dpwhp3jo\python-rtmidi_ea628cd1b6f0485b9bc34b5424db72f3.mesonpy-j1o6d2ql\meson-python-native-file.ini The Meson build system Version: 1.5.1 Source dir: C:\Users\Administrator\AppData\Local\Temp\pip-install-dpwhp3jo\python-rtmidi_ea628cd1b6f0485b9bc34b5424db72f3 Build dir: C:\Users\Administrator\AppData\Local\Temp\pip-install-dpwhp3jo\python-rtmidi_ea628cd1b6f0485b9bc34b5424db72f3.mesonpy-j1o6d2ql Build type: native build Project name: python-rtmidi Project version: 1.5.8 Activating VS 17.11.1 C++ compiler for the host machine: cl (msvc 19.41.34120 "用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.41.34120 版") C++ linker for the host machine: link link 14.41.34120.0 Host machine cpu family: x86_64 Host machine cpu: x86_64 Did not find pkg-config by name 'pkg-config' Found pkg-config: NO Found CMake: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.29.5) Run-time dependency jack found: NO (tried pkgconfig and cmake) Run-time dependency jack found: NO (tried pkgconfig and cmake) ..\meson.build:24: WARNING: No version of JACK found, which is recent enough (jack2>=1.9.11 or jack1>=0.125.0) Library winmm found: YES Run-time dependency threads found: YES WARNING: msvc does not support C++11; attempting best effort; setting the standard to C++14 Has header "semaphore.h" : NO Program python3 found: YES (d:\py\python38-32\python.exe) Program cython found: YES (C:\Users\Administrator\AppData\Local\Temp\pip-build-env-1ac0mfgf\overlay\Scripts\cython.EXE) Need python for x86_64, but found x86 Run-time dependency python found: NO (tried sysconfig)
..\rtmidi\meson.build:4:23: ERROR: Python dependency not found
A full log can be found at C:\Users\Administrator\AppData\Local\Temp\pip-install-dpwhp3jo\python-rtmidi_ea628cd1b6f0485b9bc34b5424db72f3.mesonpy-j1o6d2ql\meson-logs\meson-log.txt [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.
It seems you are trying to run Python program, which uses mido. Mido can use python-rtmidi as a backend, but you have to specify, which backends to install, when you install mido:
https://mido.readthedocs.io/en/stable/installing.html#installation
Windows PowerShell 版权所有(C) Microsoft Corporation。保留所有权利。
安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows
PS C:\Users\Administrator\PycharmProjects\pythonProject8> python -m pip install mido[ports-rtmidi] Requirement already satisfied: mido[ports-rtmidi] in d:\py\python38-32\lib\site-packages (1.3.2) Requirement already satisfied: packaging~=23.1 in d:\py\python38-32\lib\site-packages (from mido[ports-rtmidi]) (23.2) Collecting python-rtmidi~=1.5.4 (from mido[ports-rtmidi]) Using cached python_rtmidi-1.5.8.tar.gz (368 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [31 lines of output]
meson setup C:\Users\Administrator\AppData\Local\Temp\pip-install-60j8lrlj\python-rtmidi_5a61697ac5844340887dc805b0847edc C:\Users\Administrator\AppData\Local\Temp\pip-install-60j8lrlj\python-rtmidi_5a61697ac5844340887dc805b0847edc.mesonpy-uz7p43d6 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dverbose=false -Dbuildtype=plain --native-file=C:\Users\Administrator\AppData\Local\Temp\pip-install-60j8lrlj\python-rtmidi_5a61697ac5844340887dc805b0847edc.mesonpy-uz7p43d6\meson-python-native-file.ini The Meson build system Version: 1.5.1 Source dir: C:\Users\Administrator\AppData\Local\Temp\pip-install-60j8lrlj\python-rtmidi_5a61697ac5844340887dc805b0847edc Build dir: C:\Users\Administrator\AppData\Local\Temp\pip-install-60j8lrlj\python-rtmidi_5a61697ac5844340887dc805b0847edc.mesonpy-uz7p43d6 Build type: native build Project name: python-rtmidi Project version: 1.5.8 Activating VS 17.11.1 C++ compiler for the host machine: cl (msvc 19.41.34120 "用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.41.34120 版") C++ linker for the host machine: link link 14.41.34120.0 Host machine cpu family: x86_64 Host machine cpu: x86_64 Did not find pkg-config by name 'pkg-config' Found pkg-config: NO Found CMake: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.29.5) Run-time dependency jack found: NO (tried pkgconfig and cmake) Run-time dependency jack found: NO (tried pkgconfig and cmake) ..\meson.build:24: WARNING: No version of JACK found, which is recent enough (jack2>=1.9.11 or jack1>=0.125.0) Library winmm found: YES Run-time dependency threads found: YES WARNING: msvc does not support C++11; attempting best effort; setting the standard to C++14 Has header "semaphore.h" : NO Program python3 found: YES (D:\py\Python38-32\python.exe) Program cython found: YES (C:\Users\Administrator\AppData\Local\Temp\pip-build-env-odkhoz_7\overlay\Scripts\cython.EXE) Need python for x86_64, but found x86 Run-time dependency python found: NO (tried sysconfig)
..\rtmidi\meson.build:4:23: ERROR: Python dependency not found
A full log can be found at C:\Users\Administrator\AppData\Local\Temp\pip-install-60j8lrlj\python-rtmidi_5a61697ac5844340887dc805b0847edc.mesonpy-uz7p43d6\meson-logs\meson-log.txt [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. PS C:\Users\Administrator\PycharmProjects\pythonProject8>
You are trying to build python-rtmidi with a 32-bit version of Python on a 64-bit version of windows. Also, your Python version (3.8) is rather old, and support for it will end in two months:
https://www.python.org/downloads/
The python-rtmidi project does not provide binary wheels for windows and Python version 3.8. So you are on your own there, sorry. I don't have the capacity to support that.
Try upgrading your Python installation to the latest 64-bit version.
You are trying to build python-rtmidi with a 32-bit version of Python on a 64-bit version of windows. Also, your Python version (3.8) is rather old, and support for it will end in two months:You are trying to build python-rtmidi with a 32-bit version of Python on a 64-bit version of windows. Also, your Python version (3.8) is rather old, and support for it will end in two months:您正在尝试在 64 位版本的 Windows 上使用 32 位版本的 Python 构建 python-rtmidi。此外,您的 Python 版本 (3.8) 相当旧,对它的支持将在两个月后结束:
https://www.python.org/downloads/https://www.python.org/downloads/ https://www.python.org/downloads/
The python-rtmidi project does not provide binary wheels for windows and Python version 3.8. So you are on your own there, sorry. I don't have the capacity to support that.The python-rtmidi project does not provide binary wheels for windows and Python version 3.8. So you are on your own there, sorry. I don't have the capacity to support that.python-rtmidi 项目不提供适用于 Windows 和 Python 版本 3.8 的二进制轮子。所以你只能靠自己了,对不起。我没有能力支持这一点。
Try upgrading your Python installation to the latest 64-bit version.Try upgrading your Python installation to the latest 64-bit version.尝试将 Python 安装升级到最新的 64 位版本。
Which Python version 32-bit is supported by Python rtmidi library,I want to use 32-bit Python
I'm not sure. The python-rtmidi project only provides binary wheels for 64-bit Python on Windows. These are built by our CI (GitHub actions). I don't have a Windows system to test building different combinations myself.
You can try building python-rtmidi manually from the source yourself:
https://spotlightkid.github.io/python-rtmidi/install-windows.html
Try with the latest Python 3.12.5, I guess.
Alternatively, you can check whether you have more luck with other midi backends.
D:\py\Python38-32\python.exe C:\Users\Administrator\PycharmProjects\pythonProject8\OSC+MIDI11.py Traceback (most recent call last): File "C:\Users\Administrator\PycharmProjects\pythonProject8\OSC+MIDI11.py", line 245, in
app = SerialOSCBridgeApp(root)
File "C:\Users\Administrator\PycharmProjects\pythonProject8\OSC+MIDI11.py", line 76, in init
self.update_midi_devices()
File "C:\Users\Administrator\PycharmProjects\pythonProject8\OSC+MIDI11.py", line 114, in update_midi_devices
devices = mido.get_output_names()
File "D:\py\Python38-32\lib\site-packages\mido\backends\backend.py", line 180, in get_output_names
devices = self._get_devices(**self._add_api(kwargs))
File "D:\py\Python38-32\lib\site-packages\mido\backends\backend.py", line 167, in _get_devices
if hasattr(self.module, 'get_devices'):
File "D:\py\Python38-32\lib\site-packages\mido\backends\backend.py", line 47, in module
self.load()
File "D:\py\Python38-32\lib\site-packages\mido\backends\backend.py", line 63, in load
self._module = importlib.import_module(self.name)
File "D:\py\Python38-32\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "D:\py\Python38-32\lib\site-packages\mido\backends\rtmidi.py", line 11, in
import rtmidi
ModuleNotFoundError: No module named 'rtmidi'
进程已结束,退出代码为 1