You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use nbsphinx to build some code-example notebooks on http://readthedocs.io/, but have been running into an issue for codebases which rely on scipy.
NBSphinx and RTD play well together if your package can be installed into a pure (no-site-packages) virtualenv, but if you try to install Scipy that way you hit an error of error: no lapack/blas resources found. Usually this is no problem - just tick the 'Use system packages' option in RTD settings. The build then goes ahead and almost completes, but fails at the last hurdle; we get to
writing output... [ 50%] demo_notebook
...
File "/home/docs/checkouts/readthedocs.org/user_builds/nbsphinx-rtd-test/envs/latest/local/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 90, in get_lexer_by_name
...
VersionConflict: (setuptools 3.3 (/usr/lib/python2.7/dist-packages), Requirement.parse('setuptools>=18.5'))
So it seems that RTFD has a system-wide ancient version of setuptools which is causing issues for Pygements, when the virtualenv has access to system-packages.
I really wasn't sure where to post this - to your issue tracker or RTFD's - so you may want to bounce it. But it seems like a fairly serious failure case, so I'm hoping you might have a work-around or some suggestions - perhaps trying to build full-dependency notebooks on RTD is a foolish idea from the get-go - should I be trying to pre-generate locally with NBSphinx and just upload the RST's, do you think? Is that something that is already do-able, or I could contribute towards implementing?
I should add, I've actually got this sort of working in an older project - I hacked together a messy conversion script in conf.py, simply shelling out to jupyter nbconvert - which oddly enough seems to work, which is why I was surprised this didn't: https://github.com/timstaley/voeventdb.remote/blob/master/docs/source/conf.py#L118
Not sure why shelling out works when direct-calls don't, I guess the subshell runs fully in the virtualenv? Probably not of much help for nbsphinx though.
Anyway, many thanks! NBSphinx is great :)
The text was updated successfully, but these errors were encountered:
timstaley
changed the title
Impossible to build nbsphinx with Scipy requirements on readthedocs.io
Impossible to build notebooks with Scipy requirements on readthedocs.io
Sep 28, 2016
Funnily enough this seems to have been somehow related to #24, it's certainly fixed by the same workaround of adding 'IPython.sphinxext.ipython_console_highlighting' to the sphinx extensions, cf this commit.
Hi there,
I've been trying to use nbsphinx to build some code-example notebooks on http://readthedocs.io/, but have been running into an issue for codebases which rely on scipy.
You can see a test-case here:
https://github.com/timstaley/nbsphinx-rtd-test
http://readthedocs.org/projects/nbsphinx-rtd-test/builds/
NBSphinx and RTD play well together if your package can be installed into a pure (no-site-packages) virtualenv, but if you try to install Scipy that way you hit an error of
error: no lapack/blas resources found
. Usually this is no problem - just tick the 'Use system packages' option in RTD settings. The build then goes ahead and almost completes, but fails at the last hurdle; we get to(Full traceback attached:
nbsphinx-rtd-traceback.txt)
So it seems that RTFD has a system-wide ancient version of setuptools which is causing issues for Pygements, when the virtualenv has access to system-packages.
I really wasn't sure where to post this - to your issue tracker or RTFD's - so you may want to bounce it. But it seems like a fairly serious failure case, so I'm hoping you might have a work-around or some suggestions - perhaps trying to build full-dependency notebooks on RTD is a foolish idea from the get-go - should I be trying to pre-generate locally with NBSphinx and just upload the RST's, do you think? Is that something that is already do-able, or I could contribute towards implementing?
I should add, I've actually got this sort of working in an older project - I hacked together a messy conversion script in conf.py, simply shelling out to jupyter nbconvert - which oddly enough seems to work, which is why I was surprised this didn't:
https://github.com/timstaley/voeventdb.remote/blob/master/docs/source/conf.py#L118
Not sure why shelling out works when direct-calls don't, I guess the subshell runs fully in the virtualenv? Probably not of much help for nbsphinx though.
Anyway, many thanks! NBSphinx is great :)
The text was updated successfully, but these errors were encountered: