user9347860
user9347860

Reputation:

ImportError: cannot import name 'structures' python music library

I'm trying to play a note, however, importing music python library is giving me a headache

enter image description here

from music import *

note = Note(C4, HN)
Play.midi(note)

I also tried

import music

note = Note(C4, HN)
Play.midi(note)

Still got the same error

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-7-1cac5ec470ec> in <module>()
----> 1 import music
      2 
      3 note = Note(C4, HN)
      4 Play.midi(note)

/anaconda3/lib/python3.6/site-packages/music/__init__.py in <module>()
      1 from .utils import H
----> 2 from . import utils, tables, synths, effects, structures, singing
      3 from . import legacy
      4 

ImportError: cannot import name 'structures'

Upvotes: 0

Views: 1705

Answers (1)

Bill Manaris
Bill Manaris

Reputation: 81

The problem is that you are trying to run the examples in IPython, which does not support JythonMusic.

You need to download the JythonMusic environment (JEM) which comes bundled with everything. See here -

http://jythonmusic.org/download/

Upvotes: 1

Related Questions