python-midi icon indicating copy to clipboard operation
python-midi copied to clipboard

Installation issue

Open jin8864 opened this issue 2 years ago • 7 comments

I'm very beginner of Python, so I have no idea how to solve this issue. Although I see the hint, I have no clue. After I typed pip install python-midi, I ran into two error messages:

============================================================== error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\Mono\AppData\Local\Temp\pip-install-dl2lp_6a\python-midi_b113e47ab60d462f8b86e14c79761408\setup.py", line 42 print "No sequencer available for '%s' platform." % platform ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? [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.

jin8864 avatar Apr 11 '22 12:04 jin8864

Looks like the install was running python3 but you were installing the python2 version of python-midi somehow. This is one error.

semininja avatar Apr 18 '22 18:04 semininja

No, this is an error in the setup.py file. see line 65

pepperpepperpepper avatar Oct 14 '22 02:10 pepperpepperpepper

There's no line 65 in setup.py, and the python3 branch of this repo has the correct print syntax.

semininja avatar Oct 14 '22 05:10 semininja

Line 65 in setup.py below https://github.com/vishnubob/python-midi/blob/master/setup.py line 65 is below: print "No sequencer available for '%s' platform." %

pepperpepperpepper avatar Oct 14 '22 06:10 pepperpepperpepper

Wrong branch

semininja avatar Oct 14 '22 06:10 semininja

This is still an issue, I'm trying to install https://github.com/grant/algo-rhythm which has python-midi==0.2.4 in the requirements.txt file , but when pip3 downloads python-midi-v0.2.4.tar.gz , the errant setup.py is still part of that zip file, so the installation fails and I don't know enough about this stuff to fix it in the middle of an install. So it seems the fix has been implemented in the code on github, but there needs to be a new python-midi-v0.2.4.tar.gz file generated for projects that require it?

myk247365 avatar Mar 29 '24 15:03 myk247365

@myk247365 have you tried installing python-midi first, instead of letting pip3 grab the wrong one?

semininja avatar Mar 31 '24 21:03 semininja