导入XMindDocument创建思维导图

2024-04-29 03:15:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我正设法从导入xmindocumentmekk.xmind公司但我得到了一个错误:

"ImportError: No module named mekk.xmind"

我用pip安装mekk.xmind公司在

pip install mekk.xmind

error: command '"C:\Users\frank\AppData\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2

有人能帮忙吗?在


Tags: installpipno错误公司erroruserscommand
1条回答
网友
1楼 · 发布于 2024-04-29 03:15:15

模块坏了。在

我最终手动将文件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')

相关问题 更多 >