vishnubob / python-midi

Python MIDI library
MIT License
1.51k stars 370 forks source link

Could not import midi #139

Open aljohani003 opened 6 years ago

aljohani003 commented 6 years ago

Hi. I am new to python when I tried to import midi this message shown $ pip install midi Collecting midi Could not find a version that satisfies the requirement midi (from versions: ) No matching distribution found for midi

I tried also this $ pip install python-midi Collecting python-midi Using cached python-midi-v0.2.4.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-ikrcdmie/python-midi/setup.py", line 42 print "No sequencer available for '%s' platform." % platform ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "No sequencer available for '%s' platform." % platform)?

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ikrcdmie/python-midi/

I am using python 2.7

owennewo commented 6 years ago

I saw the same issue, except I was using python 3. The print statement above is not valid in Python 3 it needs parenthesis i.e. print ("No sequencer available for '%s' platform." % platform)

fengzean commented 6 years ago

pip install git+https://github.com/vishnubob/python-midi@feature/python3 should solve this problem

techkuz commented 6 years ago

If you have problems with install @fengzean way, check that sudo apt-get install libasound2-dev swig are installed

Andyz239 commented 5 years ago

try:( for python3+ ) pip3 install git+https://github.com/vishnubob/python-midi@feature/python3

Omar-Dasser commented 4 years ago

try this instead : pip install py-midi

manhongxiang commented 4 years ago

try this instead : pip install py-midi

It works. Thank you!