Doctest 认为 DocTestParser 不存在?
Doctest thinks DocTestParser doesn't exist?
我正在尝试使用 sphinx 来创建文档。我目前正在关注 Eric Holscher. During step two is the first time autodocs is used. I set the file path to find autodocs and after that the documents wouldn't compile. I keep getting AttributeError: module 'doctest' has no attribute 'DocTestParser'
. I couldn't find much online except for a couple issues on GitHub 的 PyCon 2016 教程,这只是安装问题。任何建议都会有所帮助。提前致谢。
在 conf.py 文件中,我告诉它像这样在 sphinx 扩展文件夹中使用 doctest; sys.path.insert(0, os.path.abspath('../venv/Lib/site-packages/sphinx/ext/'))
.
应该只指向 Lib 文件夹; sys.path.insert(0, os.path.abspath('../venv/Lib/'))
这完全符合要求。
我正在尝试使用 sphinx 来创建文档。我目前正在关注 Eric Holscher. During step two is the first time autodocs is used. I set the file path to find autodocs and after that the documents wouldn't compile. I keep getting AttributeError: module 'doctest' has no attribute 'DocTestParser'
. I couldn't find much online except for a couple issues on GitHub 的 PyCon 2016 教程,这只是安装问题。任何建议都会有所帮助。提前致谢。
在 conf.py 文件中,我告诉它像这样在 sphinx 扩展文件夹中使用 doctest; sys.path.insert(0, os.path.abspath('../venv/Lib/site-packages/sphinx/ext/'))
.
应该只指向 Lib 文件夹; sys.path.insert(0, os.path.abspath('../venv/Lib/'))
这完全符合要求。