Doctest认为DocTestParser不存在?

2024-09-27 19:18:46 发布

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

我正在尝试使用sphinx来创建文档。我现在正在学习PyCon 2016的Eric Holscher教程。第二步是第一次使用autodocs。我将文件路径设置为查找autodocs,然后文档就不会编译了。我一直得到AttributeError: module 'doctest' has no attribute 'DocTestParser'。除了GitHub上的几个安装问题外,我在网上找不到太多东西。任何建议都会有帮助。提前谢谢


Tags: 文件no文档路径sphinxattribute教程doctest
1条回答
网友
1楼 · 发布于 2024-09-27 19:18:46

在conf.py文件中,我告诉它像这样使用sphinx扩展文件夹中的doctestsys.path.insert(0, os.path.abspath('../venv/Lib/site-packages/sphinx/ext/'))

应该只指向Lib文件夹sys.path.insert(0, os.path.abspath('../venv/Lib/'))

这一切都很顺利

相关问题 更多 >

    热门问题