-2

I want to use the python-midi package (from https://github.com/vishnubob/python-midi). Hwever there is an error when I use it.

import midi
pattern = midi.Pattern()

When I run it, I have the following error:

pattern = midi.Pattern()
AttributeError: 'module' object has no attribute 'Pattern'

I tried to install this package with:

  • pip install git+https://github.com/vishnubob/python-midi@feature/python3
  • pip install python-midi
  • python setup.py install (in downloading the projet)

Thank you in advance for your help.

Olivier Pons
  • 15,363
  • 26
  • 117
  • 213
Juan
  • 184
  • 1
  • 4
  • 16

1 Answers1

0

I found the solution. I use this command "pip freeze" to know wihch packages I downloaded. Then I uninstall all packages concerning midi. And finally I downloaded the package with this command "sudo -H pip install python-midi". And I have no issues when I run my code anymore. We can also do if we use python3:

Juan
  • 184
  • 1
  • 4
  • 16