Error installing rtmidi Python library on Windows 7

77 Views Asked by At

I am running Python 3.8.10 on Windows 7 Ultimate of 32 bits on 64 bits microprocessor. I am trying to install rtmidi library, but I get this error:

C:\Users\CEMARIECOLINA\AppData\Local\Programs\Python\Python38-32>pip install rtm
idi
Collecting rtmidi
  Using cached rtmidi-2.5.0.tar.gz (56 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: rtmidi
  Building wheel for rtmidi (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ?─> [16 lines of output]
      c:\users\cemariecolina\appdata\local\programs\python\python38-32\lib\site-
packages\setuptools\_distutils\extension.py:134: UserWarning: Unknown Extension
options: 'headers'
        warnings.warn(msg)
      c:\users\cemariecolina\appdata\local\programs\python\python38-32\lib\site-
packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution op
tion: 'description_content_type'
        warnings.warn(msg)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-38
      creating build\lib.win32-cpython-38\rtmidi
      copying rtmidi\collector.py -> build\lib.win32-cpython-38\rtmidi
      copying rtmidi\randomout.py -> build\lib.win32-cpython-38\rtmidi
      copying rtmidi\__init__.py -> build\lib.win32-cpython-38\rtmidi
      running build_ext
      building 'rtmidi._rtmidi' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Micr
osoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tool
s/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem wit
h pip.
  ERROR: Failed building wheel for rtmidi
  Running setup.py clean for rtmidi
Failed to build rtmidi
ERROR: Could not build wheels for rtmidi, which is required to install pyproject
.toml-based projects

Can you help me? Please.

Before hand Thank you by your insteresing answers.

I have tried installing C++ Redistributable 14.0, upgrading pip, but it can not work.

1

There are 1 best solutions below

4
user16171413 On

Please upgrade to Python 3.11 as rtmidi currently supports python 3.11.

Then you can run python -m pip install rtmidi.