ImportError: cannot import name 'structures' python music library
ImportError: cannot import name 'structures' python music library
我正在尝试弹奏音符,但是导入音乐 python 库让我很头疼
from music import *
note = Note(C4, HN)
Play.midi(note)
我也试过了
import music
note = Note(C4, HN)
Play.midi(note)
仍然出现同样的错误
---------------------------------------------------------------------------
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'
问题是您正在尝试 运行 IPython 中的示例,它不支持 JythonMusic。
您需要下载与所有内容捆绑在一起的 JythonMusic 环境 (JEM)。看这里-
我正在尝试弹奏音符,但是导入音乐 python 库让我很头疼
from music import *
note = Note(C4, HN)
Play.midi(note)
我也试过了
import music
note = Note(C4, HN)
Play.midi(note)
仍然出现同样的错误
---------------------------------------------------------------------------
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'
问题是您正在尝试 运行 IPython 中的示例,它不支持 JythonMusic。
您需要下载与所有内容捆绑在一起的 JythonMusic 环境 (JEM)。看这里-