0

我正在尝试从 mekk.xmind 导入 XMindDocument,但出现错误:

“ImportError:没有名为 mekk.xmind 的模块”

我用 pip 安装 mekk.xmind

pip install mekk.xmind

错误:命令 '"C:\Users\frank\AppData\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe"' 失败,退出状态为 2

任何人都可以帮忙吗?

4

1 回答 1

0

模块坏了。

我最终手动将文件cp -r <location>/mekk/xmind mekkxmind<location>可以通过 找到pip show mekk.xmind)复制到我的工作目录并从那里导入:

from mekkxmind import XMindDocument


xmind = XMindDocument.create(u"First sheet title", u"Root subject")
first_sheet = xmind.get_first_sheet()
root_topic = first_sheet.get_root_topic()

root_topic.add_subtopic(u"First item")
root_topic.add_subtopic(u"Second item")
t = root_topic.add_subtopic(u"Third item")
t.add_subtopic(u"Second level - 1")
t.add_subtopic(u"Second level - 2")
root_topic.add_subtopic(u"Detached topic", detached = True)
t.add_subtopic(u"Another detached", detached = True)
t.add_marker("flag-red")
root_topic.add_subtopic(u"Link example").set_link("https://stackoverflow.com/questions/42896645/import-xminddocument-to-create-mindmap")
root_topic.add_subtopic(u"With note").set_note(u"""This is just some dummy note.""")

xmind.pretty_print()
# xmind.save('test.xmind')
于 2017-12-04T18:53:19.433 回答