Sphinx文档中的make html中的导入模块错误

问题描述

当我输入make html时,出现有关自动汇总无法导入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

我确实在conda环境中安装了 openmc

In [2]: openmc.__version__
Out[2]: '0.12.1-dev'

# 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

看看链接docs 我安装了python模块后,为什么找不到它?有什么解决方案?谁能提供一些建议?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)