Python 在Sphinx文档中导入make html中的模块时出错

Python 在Sphinx文档中导入make html中的模块时出错,python,anaconda,jinja2,python-sphinx,Python,Anaconda,Jinja2,Python Sphinx,当我键入makehtml时,我得到了一个错误,关于自动摘要导入python模块失败 sphinx-build -b html -d build/doctrees source build/html Running Sphinx v3.2.1 making output directory... done [autosummary] generating autosummary for: capi/index.rst, devguide/contributing.rst, devgui

当我键入
makehtml
时,我得到了一个错误,关于自动摘要导入python模块失败

    sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v3.2.1
making output directory... done
[autosummary] generating autosummary for: capi/index.rst, devguide/contributing.rst, devguide/docbuild.rst, devguide/docker.rst, devguide/index.rst, devguide/styleguide.rst, devguide/tests.rst, devguide/user-input.rst, devguide/workflow.rst, examples/cad-geom.rst, ..., usersguide/install.rst, usersguide/materials.rst, usersguide/parallel.rst, usersguide/plots.rst, usersguide/processing.rst, usersguide/scripts.rst, usersguide/settings.rst, usersguide/tallies.rst, usersguide/troubleshoot.rst, usersguide/volume.rst
Failed to import 'openmc.lib': no module named openmc.lib
WARNING: [autosummary] failed to import 'openmc.cmfd.CMFDMesh': no module named openmc.cmfd.CMFDMesh
WARNING: [autosummary] failed to import 'openmc.cmfd.CMFDRun': no module named openmc.cmfd.CMFDRun
WARNING: [autosummary] failed to import 'openmc.deplete.AtomNumber': no module named openmc.deplete.AtomNumber
WARNING: [autosummary] failed to import 'openmc.deplete.CECMIntegrator': no module named openmc.deplete.CECMIntegrator
WARNING: [autosummary] failed to import 'openmc.deplete.CELIIntegrator': no module named openmc.deplete.CELIIntegrator
WARNING: [autosummary] failed to import 'openmc.deplete.CF4Integrator': no module named openmc.deplete.CF4Integrator
WARNING: [autosummary] failed to import 'openmc.deplete.Chain': no module named openmc.deplete.Chain
WARNING: [autosummary] failed to import 'openmc.deplete.DecayTuple': no module named openmc.deplete.DecayTuple
WARNING: [autosummary] failed to import 'openmc.deplete.EPCRK4Integrator': no module named openmc.deplete.EPCRK4Integrator
WARNING: [autosummary] failed to import 'openmc.deplete.FissionYield': no module named openmc.deplete.FissionYield
WARNING: [autosummary] failed to import 'openmc.deplete.FissionYieldDistribution': no module named openmc.deplete.FissionYieldDistribution
WARNING: [autosummary] failed to import 'openmc.deplete.LEQIIntegrator': no module named openmc.deplete.LEQIIntegrator
WARNING: [autosummary] failed to import 'openmc.deplete.Nuclide': no module named openmc.deplete.Nuclide
[autosummary] generating autosummary for: /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.AzimuthalFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.Cell.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellFromFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellInstanceFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellbornFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.Complement.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.Cone.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.DelayedGroupFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.DistribcellFilter.rst, ..., /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Normal.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Point.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.PolarAzimuthal.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Spatial.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.SphericalIndependent.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Tabular.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Uniform.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.UnitSphere.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Univariate.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Watt.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/reference/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://matplotlib.org/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 116 source files that are out of date
updating environment: [new config] 357 added, 0 changed, 0 removed
reading sources... [  2%] examples/cad-geom                                                                                                       
Exception occurred:
  File "/home/pranto/anaconda3/envs/test/lib/python3.8/site-packages/jinja2/loaders.py", line 429, in load
    raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: full
The full traceback has been saved in /tmp/sphinx-err-spegijiz.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:50: recipe for target 'html' failed
make: *** [html] Error 2

我已经安装了所有依赖项

# packages in environment at /home/pranto/anaconda3/envs/test:
#
# Name                    Version                   Build  Channel
sphinx                    3.2.1                    pypi_0    pypi
sphinx-numfig             0.1.1                    pypi_0    pypi
sphinx-rtd-theme          0.5.0                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.2                    pypi_0    pypi
sphinxcontrib-devhelp     1.0.2                    pypi_0    pypi
sphinxcontrib-htmlhelp    1.0.3                    pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-katex       0.6.1                    pypi_0    pypi
sphinxcontrib-qthelp      1.0.3                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.4                    pypi_0    pypi
sphinxcontrib-svg2pdfconverter 1.1.0                    pypi_0    pypi

看看这个链接。
我已经安装了python模块,为什么他找不到它?解决办法是什么?有人能提供一些建议吗?

Sphinx是否安装在与openmc相同的虚拟环境中?是的,@StevePiercy。我已经安装了所有依赖项。你认为这个错误与狮身人面像有关吗?Jinja也有问题:
jinja2.exceptions.TemplateNotFound:full
我在
/home/pranto/anaconda3/envs/test
中没有看到
openmc
。导入问题几乎不是Sphinx的错,而是用户没有在Sphinx相同的虚拟环境中安装要记录的包,或者没有在其
conf.py
中提供正确的路径,从而Sphinx可以导入所述包。请参阅@StevePiercy上的第一个注释,我确实在
/home/pranto/anaconda3/envs/test
中安装了
openmc
sys.path.insert(0,os.path.abspath(“....”)
conf.py
中给出了正确的路径。Sphinx是否安装在与openmc?Yep,@StevePiercy相同的虚拟环境中。我已经安装了所有依赖项。你认为这个错误与狮身人面像有关吗?Jinja也有问题:
jinja2.exceptions.TemplateNotFound:full
我在
/home/pranto/anaconda3/envs/test
中没有看到
openmc
。导入问题几乎不是Sphinx的错,而是用户没有在Sphinx相同的虚拟环境中安装要记录的包,或者没有在其
conf.py
中提供正确的路径,从而Sphinx可以导入所述包。请参阅@StevePiercy上的第一个注释,我确实在
/home/pranto/anaconda3/envs/test
中安装了
openmc
sys.path.insert(0,os.path.abspath(“../”)
conf.py
中也给出了正确的路径。
# packages in environment at /home/pranto/anaconda3/envs/test:
#
# Name                    Version                   Build  Channel
openmc                    0.12.1.dev0              pypi_0    pypi
# packages in environment at /home/pranto/anaconda3/envs/test:
#
# Name                    Version                   Build  Channel
sphinx                    3.2.1                    pypi_0    pypi
sphinx-numfig             0.1.1                    pypi_0    pypi
sphinx-rtd-theme          0.5.0                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.2                    pypi_0    pypi
sphinxcontrib-devhelp     1.0.2                    pypi_0    pypi
sphinxcontrib-htmlhelp    1.0.3                    pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-katex       0.6.1                    pypi_0    pypi
sphinxcontrib-qthelp      1.0.3                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.4                    pypi_0    pypi
sphinxcontrib-svg2pdfconverter 1.1.0                    pypi_0    pypi