qutip / qutip-doc

QuTiP documentation
36 stars 58 forks source link

Cannot build documentation #62

Closed joseraulgonzalez closed 3 years ago

joseraulgonzalez commented 5 years ago

Hi,

After installing the required dependencies and cloning the repo, I issued the following command:

make html

and got the following error:

Extension error:
Could not import extension matplotlib.sphinxext.only_directives (exception: No module named 'matplotlib.sphinxext.only_directives')
make: *** [latexpdf] Error 2

What am I doing wrong? Can anyone help me fix this please? Thanks!

nathanshammah commented 5 years ago

It seems it might be an issue of Matplotlib, see #914, and not of Sphinx. Try a conda update matplotlib (or your package manager of choice).

ajgpitch commented 5 years ago

Perhaps it is not clear, but qutip and all its dependencies (inc matplotlib) are also required. I will update the readme.

On Sat, 5 Jan 2019 at 12:57, yosefrajwulf notifications@github.com wrote:

Hi,

After installing the required dependencies and cloning the repo, I issued the following command:

make html

and got the following error:

Extension error: Could not import extension matplotlib.sphinxext.only_directives (exception: No module named 'matplotlib.sphinxext.only_directives') make: *** [latexpdf] Error 2

What am I doing wrong? Can anyone help me fix this please? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/qutip/qutip-doc/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AIxX7al1eV0JYKcupe0jq3ewkOueI7Uiks5vACKpgaJpZM4ZvB4t .

ajgpitch commented 5 years ago

@joseraulgonzalez apologies. It seems there is an issue #66. @nathanshammah and I were building just yesterday. Nathan, could you share the sphinx version pls

ajgpitch commented 5 years ago

Nathan and I have spent some time trying to build the docs in various envs. We have success with python=3.6 matplotlib=2.2.3 sphinx=1.7.9 ipython=6.5

We get some error whenever we use Python 3.7, even with same package versions above. A bit mysterious. @nathanshammah will please put up the error get. So I guess we should focus on the proper fix #66

nathanshammah commented 5 years ago
(qutip4_3-docs-py37) Nathans-MacBook-Pro:qutip-doc nathanshammah$ make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.7.9
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 34 source files that are out of date
updating environment: 34 added, 0 changed, 0 removed
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Note in the docstring of None in None.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Note in the docstring of <function Qobj.matrix_element at 0xa16705ea0> in /Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/qobj.py.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Example in the docstring of None in None.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Example in the docstring of <class 'qutip.piqs.Dicke'> in /Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/piqs.py.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Note in the docstring of None in None.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Note in the docstring of <function rand_herm at 0xf16ce0ae8> in /Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/random_objects.py.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Todo in the docstring of None in None.
  warn(msg)
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/numpydoc/docscrape.py:377: UserWarning: Unknown section Todo in the docstring of <function smesolve at 0x1a170b1950> in /Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/stochastic.py.
  warn(msg)
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

>>>-------------------------------------------------------------------------
Warning in /Users/nathanshammah/github/qutip-doc/guide/dynamics/dynamics-bloch-redfield.rst at block ending on line 264
Specify :okwarning: as an option in the ipython:: block to suppress this message
----------------------------------------------------------------------------
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /Users/nathanshammah/github/qutip-doc/rhs373500.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
<<<-------------------------------------------------------------------------
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/bloch.py:docstring of qutip.bloch.Bloch:68: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/bloch.py:docstring of qutip.bloch.Bloch.vector_style:2: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/nonmarkov/heom.py:docstring of qutip.nonmarkov.heom.HEOMSolver.create_new_stats:4: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/solver.py:docstring of qutip.solver.Stats:43: WARNING: toctree references unknown document 'apidoc/qutip.solver.Stats.add_section'
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/solver.py:docstring of qutip.solver.Stats:43: WARNING: toctree references unknown document 'apidoc/qutip.solver.Stats.add_count'
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/solver.py:docstring of qutip.solver.Stats:43: WARNING: toctree references unknown document 'apidoc/qutip.solver.Stats.add_timing'
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/solver.py:docstring of qutip.solver.Stats:43: WARNING: toctree references unknown document 'apidoc/qutip.solver.Stats.add_message'
/Users/nathanshammah/github/qutip-doc/apidoc/classes.rst:79: WARNING: Title underline too short.

Permutational Invariance
---------------
/Users/nathanshammah/github/qutip-doc/apidoc/classes.rst:79: WARNING: Title underline too short.

Permutational Invariance
---------------
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/optimizer.py:docstring of qutip.control.optimizer.Optimizer:10: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/optimizer.py:docstring of qutip.control.optimizer.Optimizer:43: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/optimizer.py:docstring of qutip.control.optimizer.Optimizer.dumping:11: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/optimizer.py:docstring of qutip.control.optimizer.OptimizerCrabFmin:22: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dynamics.py:docstring of qutip.control.dynamics.Dynamics.dumping:4: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dynamics.py:docstring of qutip.control.dynamics.Dynamics.dumping:8: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dynamics.py:docstring of qutip.control.dynamics.Dynamics.phase_application:4: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dynamics.py:docstring of qutip.control.dynamics.Dynamics.phase_application:7: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/propcomp.py:docstring of qutip.control.propcomp.PropCompFrechet:4: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dump.py:docstring of qutip.control.dump.Dump.level:10: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dump.py:docstring of qutip.control.dump.DynamicsDump:24: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dump.py:docstring of qutip.control.dump.DynamicsDump.writeout:4: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dump.py:docstring of qutip.control.dump.DynamicsDump.writeout:8: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dump.py:docstring of qutip.control.dump.DumpSummaryItem:7: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/dump.py:docstring of qutip.control.dump.EvoCompDumpItem:2: WARNING: Unknown target name: "dump".
WARNING: missing attribute mentioned in :members: or __all__: module qutip.states, attribute triplet_states. w_state
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.bell_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.singlet_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.singlet_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.singlet_state:4: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.singlet_state:12: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.spin_state:2: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/states.py:docstring of qutip.states.spin_coherent:2: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/github/qutip-doc/apidoc/functions.rst:100: WARNING: Title underline too short.

Continuous Variables
-------------------
/Users/nathanshammah/github/qutip-doc/apidoc/functions.rst:100: WARNING: Title underline too short.

Continuous Variables
-------------------
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/steadystate.py:docstring of qutip.steadystate.steadystate:24: WARNING: Block quote ends without a blank line; unexpected unindent.
WARNING: missing attribute mentioned in :members: or __all__: module qutip.piqs, attribute iden
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/piqs.py:docstring of qutip.piqs.ap:2: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/piqs.py:docstring of qutip.piqs.ap:10: WARNING: Inline substitution_reference start-string without end-string.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/piqs.py:docstring of qutip.piqs.dicke_basis:4: WARNING: Inline substitution_reference start-string without end-string.
WARNING: missing attribute mentioned in :members: or __all__: module qutip.visualization, attribute wigner_cmap
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/visualization.py:docstring of qutip.visualization.plot_qubism:39: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/visualization.py:docstring of qutip.visualization.plot_qubism:40: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.optimize_pulse:97: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.optimize_pulse:175: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.optimize_pulse:176: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.optimize_pulse_unitary:80: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.create_pulse_optimizer:72: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.create_pulse_optimizer:93: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab:105: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab:156: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab:157: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab_unitary:109: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab_unitary:115: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab_unitary:148: WARNING: Unexpected indentation.
/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/qutip/control/pulseoptim.py:docstring of qutip.control.pulseoptim.opt_pulse_crab_unitary:149: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/nathanshammah/github/qutip-doc/changelog.rst:89: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/nathanshammah/github/qutip-doc/changelog.rst:108: WARNING: Bullet list ends without a blank line; unexpected unindent.

Exception occurred:
  File "/Users/nathanshammah/miniconda3/envs/qutip4_3-docs-py37/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 583, in process_input
    raise RuntimeError('Non Expected warning in `{}` line {}'.format(filename, lineno))
RuntimeError: Non Expected warning in `/Users/nathanshammah/github/qutip-doc/guide/dynamics/dynamics-bloch-redfield.rst` line 264
The full traceback has been saved in /var/folders/pb/dvvg34wj10n833xfthwjbqkc0000gn/T/sphinx-err-q_4a3n9a.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!
make: *** [html] Error 2
nathanshammah commented 5 years ago

There might be two issues however. One is accounted above (Python 3.7).

Another error occurs by simply upgrading to Matplotlib 3.0.2 even in the Python 3.6 environment.

(qutip4_3-docs-py36) nathans-mbp:qutip-doc nathanshammah$ make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.7.9

Extension error:
Could not import extension matplotlib.sphinxext.only_directives (exception: No module named 'matplotlib.sphinxext.only_directives')
make: *** [html] Error 2
jakelishman commented 3 years ago

Fixed in #81.