qutip / qutip-qip

The QuTiP quantum information processing package
https://qutip-qip.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
116 stars 63 forks source link

Error when building or testing the docs #38

Closed nathanshammah closed 3 years ago

nathanshammah commented 3 years ago

From terminal, I get this error:

  ~/gi/qutip-qip   master ❯ cd docs                              mitiqdev
  ~/gi/qutip-qip/docs   master ❯ make doctest                    mitiqdev
Running Sphinx v3.5.4

Extension error:
Could not import extension numpydoc (exception: No module named 'numpydoc')
make: *** [doctest] Error 2
  ~/gi/qutip-qip/docs   master ❯ pip install sphinx numpydoc sphinx_rtd_theme doctest

Requirement already satisfied: sphinx in /opt/miniconda3/envs/mitiqdev/lib/python3.8/site-packages (3.5.4)
Collecting numpydoc
  Using cached numpydoc-1.1.0-py3-none-any.whl (47 kB)
Collecting sphinx_rtd_theme
  Downloading sphinx_rtd_theme-0.5.2-py2.py3-none-any.whl (9.1 MB)
     |████████████████████████████████| 9.1 MB 7.5 MB/s
ERROR: Could not find a version that satisfies the requirement doctest (from versions: none)
ERROR: No matching distribution found for doctest
  ~/gi/qutip-qip/docs   master ❯ make html                       mitiqdev
Running Sphinx v3.5.4

Extension error:
Could not import extension numpydoc (exception: No module named 'numpydoc')
make: *** [html] Error 2

Is the following wrong?

pip install sphinx numpydoc sphinx_rtd_theme doctest
BoxiLi commented 3 years ago

Ok... I see the same. I can do it without pip install doctest. Maybe doctest is part of sphinx?

The following works for me.

pip install qutip matplotlib sphinx numpydoc sphinx_rtd_theme
pip install .
cd docs
make doctest
nathanshammah commented 3 years ago

@BoxiLi, your solution worked for me. I suggest updating the readme with basically the codeblock that you show. I guess the pip install . is not required there, as it's already in the installation.