Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559594 - [science overlay] dev-python/nbconvert-4.0.0: jupyter: 'nbconvert' is not a Jupyter command
Summary: [science overlay] dev-python/nbconvert-4.0.0: jupyter: 'nbconvert' is not a J...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marius Brehler
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-04 13:20 UTC by Andrey Grozin
Modified: 2015-09-10 07:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Grozin gentoo-dev 2015-09-04 13:20:30 UTC
* python2_7: running distutils-r1_run_phase python_compile_all
make -j8 -C docs html 
make: Entering directory '/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0/docs'
python3 autogen_config.py
jupyter nbconvert --to rst source/customizing.ipynb --FilesWriter.build_directory=source
jupyter: 'nbconvert' is not a Jupyter command
Makefile:64: recipe for target 'ipynb2rst' failed
make: *** [ipynb2rst] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "autogen_config.py", line 4, in <module>
    from nbconvert.nbconvertapp import NbConvertApp
  File "/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0-python2_7/lib/nbconvert/__init__.py", line 4, in <module>
    from .exporters import *
  File "/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0-python2_7/lib/nbconvert/exporters/__init__.py", line 1, in <module>
    from .export import *
  File "/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0-python2_7/lib/nbconvert/exporters/export.py", line 12, in <module>
    from .templateexporter import TemplateExporter
  File "/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0-python2_7/lib/nbconvert/exporters/templateexporter.py", line 21, in <module>
    from nbconvert import filters
  File "/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0-python2_7/lib/nbconvert/filters/__init__.py", line 7, in <module>
    from .strings import *
  File "/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0-python2_7/lib/nbconvert/filters/strings.py", line 20, in <module>
    from IPython.core.interactiveshell import InteractiveShell
  File "/usr/lib64/python3.3/site-packages/IPython/__init__.py", line 48, in <module>
    from .core.application import Application
  File "/usr/lib64/python3.3/site-packages/IPython/core/application.py", line 22, in <module>
    from IPython.config.application import Application, catch_config_error
  File "/usr/lib64/python3.3/site-packages/IPython/config/__init__.py", line 6, in <module>
    from .application import *
  File "/usr/lib64/python3.3/site-packages/IPython/config/application.py", line 19, in <module>
    from IPython.config.configurable import SingletonConfigurable
  File "/usr/lib64/python3.3/site-packages/IPython/config/configurable.py", line 14, in <module>
    from IPython.utils.text import indent, wrap_paragraphs
  File "/usr/lib64/python3.3/site-packages/IPython/utils/text.py", line 28, in <module>
    from IPython.external.path import path
ImportError: cannot import name path
Makefile:60: recipe for target 'source/config_options.rst' failed
make: *** [source/config_options.rst] Error 1
make: Leaving directory '/var/tmp/portage/dev-python/nbconvert-4.0.0/work/nbconvert-4.0.0/docs'
Comment 1 Andrey Grozin gentoo-dev 2015-09-04 13:31:12 UTC
The same happens with dev-python/notebook. USE=-doc emerge helps.
Comment 2 Andrey Grozin gentoo-dev 2015-09-04 14:40:05 UTC
dev-python/qtconsole-4.0.1: similar (but not identical) problem

 * python2_7: running distutils-r1_run_phase python_compile_all
make -j8 -C docs html 
make: Entering directory '/var/tmp/portage/dev-python/qtconsole-4.0.1/work/qtconsole-4.0.1/docs'
python3 autogen_config.py
Created docs for config options
sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v1.3.1
making output directory...

Extension error:
Could not import extension IPython.sphinxext.ipython_console_highlighting (exception: cannot import name path)
Makefile:57: recipe for target 'html' failed
make: *** [html] Error 1
make: Leaving directory '/var/tmp/portage/dev-python/qtconsole-4.0.1/work/qtconsole-4.0.1/docs'
Comment 3 Marius Brehler 2015-09-05 10:12:12 UTC
Thanks for reporting.

dev-python/qtconsole:
IPython.sphinxext is required. Unfortunately the current ipython-4.0.0 pulls in qtconsole if the qt4 useflag is set. Thus adding 'doc? ( dev-python/ipython )' to the qtconsole ebuild would result in a circular dependency. I'll see if there is a way to solve that.


dev-python/nbconvert:
The jupyter-nbconvert command isn't installed at the time of doc generation. I therefore wrote a hopefully acceptable patch. Further, pandoc is needed for the doc generation, which I added to the dependencies. Hopefully we don't run into a similar problem than with qtconsole (requiring ipython), also [1] mentioning ipython as requirement. As I don't have pandoc on my system and currently lacking time, I push that without fully testing and would therefore appreciate any feedback.

+*nbconvert-4.0.0-r1 (05 Sep 2015)
+
+  05 Sep 2015; Marius Brehler <marbre@linux.sungazer.de>
+  +files/nbconvert-4.0.0-docs-Makefile.patch, +nbconvert-4.0.0-r1.ebuild,
+  -nbconvert-4.0.0.ebuild, nbconvert-9999.ebuild
+  dev-python/nbconvert: Patch docs/Makefile, add pandoc dependency. Fixes bug 
+  #559594.
+


dev-python/notebook:
Similar troubles as with the other ebuilds. pandoc is required, because nbconvert is used for notebook docs. We decided not to add pandoc as nbconvert dependency as this would pull in about 80 additional packages and should normally not be needed (expect for doc generation and conversion to other thank HTML, markup). I will therefore added pandoc to the notebook deps, after getting rid of repoman moaning about some bad dependencies.
Taking a look into [2], let's me assume that we will run into the same circular dependency requiring ipython.




[1] https://github.com/jupyter/nbconvert/blob/master/docs/requirements.txt
[2] https://github.com/jupyter/notebook/blob/master/docs/requirements.txt
Comment 4 Marius Brehler 2015-09-05 10:58:45 UTC
+*notebook-4.0.4-r2 (05 Sep 2015)
+
+  05 Sep 2015; Marius Brehler <marbre@linux.sungazer.de>
+  +notebook-4.0.4-r2.ebuild, -notebook-4.0.4-r1.ebuild, notebook-9999.ebuild:
+  dev-python/notebook: pandoc required for use doc, partially fixes bug #559594
+
Comment 5 Marius Brehler 2015-09-05 12:56:54 UTC
+  05 Sep 2015; Marius Brehler <marbre@linux.sungazer.de> notebook-9999.ebuild:
+  dev-python/notebook: Add deps for doc, fixes bug #559594
+


+*qtconsole-4.0.1-r1 (05 Sep 2015)
+
+  05 Sep 2015; Marius Brehler <marbre@linux.sungazer.de>
+  +qtconsole-4.0.1-r1.ebuild, -qtconsole-4.0.1.ebuild, qtconsole-9999.ebuild:
+  dev-python/qtconsole: Add deps for doc, fixes bug #559594
+


+  05 Sep 2015; Marius Brehler <marbre@linux.sungazer.de> nbconvert-9999.ebuild:
+  dev-python/nbconvert: Add deps for doc, fixes bug #559594
+

If necessary, circular dependencies should probably tried to be reduced in the ipython ebuild.