【问题标题】:ModuleNotFoundError: No module named 'magenta.protobuf' but I have installed itModuleNotFoundError:没有名为“magenta.protobuf”的模块,但我已经安装了它
【发布时间】:2020-11-21 07:22:02
【问题描述】:

我在 iMac 上的洋红色环境中运行 python 文件,但出现错误:

ModuleNotFoundError: 没有名为“magenta.protobuf”的模块

虽然我试过了:

  • pip install protobuf
  • pip3 安装 protobuf
  • pip install protobuf-compiler
  • pip3 安装 protobuf 编译器

有人可以帮忙吗?

【问题讨论】:

  • 在控制台输入which pipwhich python,比较路径。
  • @OlvinR​​oght which pip

标签: python protocol-buffers magenta


【解决方案1】:

你可以试试这个:

pip install note-seq

然后

import note_seq.protobuf

【讨论】: