2024-09-27 19:18:46 发布
网友
我正在尝试使用sphinx来创建文档。我现在正在学习PyCon 2016的Eric Holscher教程。第二步是第一次使用autodocs。我将文件路径设置为查找autodocs,然后文档就不会编译了。我一直得到AttributeError: module 'doctest' has no attribute 'DocTestParser'。除了GitHub上的几个安装问题外,我在网上找不到太多东西。任何建议都会有帮助。提前谢谢
AttributeError: module 'doctest' has no attribute 'DocTestParser'
在conf.py文件中,我告诉它像这样使用sphinx扩展文件夹中的doctestsys.path.insert(0, os.path.abspath('../venv/Lib/site-packages/sphinx/ext/'))
sys.path.insert(0, os.path.abspath('../venv/Lib/site-packages/sphinx/ext/'))
应该只指向Lib文件夹sys.path.insert(0, os.path.abspath('../venv/Lib/'))
sys.path.insert(0, os.path.abspath('../venv/Lib/'))
这一切都很顺利
在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/'))
这一切都很顺利
相关问题 更多 >
编程相关推荐