python - 无法在 Sublime Text 中运行 RstPreview 解析器

标签 python html sublimetext2 restructuredtext docutils

对于 sublime text,我安装了 RstPreview,下载了 docutils-0.11,并通过在命令提示符中运行 C:\Anaconda\python setup.py install 来安装它(我我使用的是 Windows 7 64 位)。

当我按 Ctrl+Shift+R 解析 .rst 文件时,我得到以下内容,

enter image description here

构建系统设置为C:\Anaconda\python,其中 docutils 正常导入,但看似 sublime text 尝试从我的内部 Python 系统导入 docutils不知道如何安装库。

提前致谢!

最佳答案

读完 issues 后对于这个插件,看起来没有什么好的方法让它在 Windows 上工作。如果你愿意的话,我可以扩展技术细节,但基本上这个插件依赖于将第三方包(docutils)安装到 Sublime Text 使用的 Python 版本中,在 Windows 上它与任何其他包完全分开。您可能已安装的 Python 版本,例如 Anaconda。作者从未在 Windows 上测试过它,据我所知,没有人发布过任何让它在该平台上成功运行的方法。

作为替代方案,您可能需要查看 OmniMarkupPreviewer插入。从其描述来看:

OmniMarkupPreviewer is a plugin for both Sublime Text 2 and Sublime Text 3 that preview markups in web browsers. OmniMarkupPreviewer renders markups into htmls and send it to web browser in the backgound, which enables a live preview. Besides, OmniMarkupPreviewer provide support for exporting result to html file as well.

它支持 reStructuredText 以及其他几种格式,虽然我还没有亲自测试过它,但看起来它可以满足您的需求。

关于python - 无法在 Sublime Text 中运行 RstPreview 解析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21047114/

相关文章:

algorithm - Sublime Text 使用哪种算法/数据结构进行文件搜索

python - python3构建的Sublime Text 2编码错误

python - 使用 Cartopy 插入城市地区的温度数据

html - 需要 CSS 帮助。真的不对劲

javascript - _lpchecked ="1"在表单中的作用是什么?

editor - 如何对我的 Sublime 语言文件启用拼写检查?

python - 最佳数量的进程可同时写入大量文件

python - 使用 QMessageBox 时无法使用 QThread 设置父级错误

python - 转置后找不到列名

javascript - 使用 jquery 显示两个数据透视表