Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Please provide scipy and matplotlib #217

Closed
njsmith opened this Issue Jul 11, 2012 · 8 comments

Comments

Projects
None yet
8 participants

njsmith commented Jul 11, 2012

I'm trying to get some docs working properly that use the "ipython_directive" sphinx extension to generate demo output during the doc build (it's pretty slick, e.g.: http://patsy.readthedocs.org/en/latest/quickstart.html, and very very useful for scientific packages where the end user is expected to be using the REPL as their main user-interface.). Unfortunately though this means that I need the packages I use to actually be present and working during the doc build -- mocking won't work.

Obviously you don't want to get into the business of supporting every python package out there, but if you could include a few more of the foundational scientific ones (which are also the ones that are most impossible to 'pip install'), then that would be awesome. The obvious candidates are scipy and matplotlib. Scipy because it's at the very bottom of everyone's stack right next to numpy (which you already install, thanks!); matplotlib because it's hugely popular, has a messy dependency chain, and is very often used to generate plots for inclusion in docs. (There are multiple sphinx extensions just for this.)

It should just be a matter of an 'apt-get install python-matplotlib python-scipy'.

Contributor

Carreau commented Aug 8, 2012

+1
Even if this means to decrease the frequency of the builds....

Contributor

mstimberg commented Sep 7, 2012

I'd like to add that for our project, this issue is the reason that we can't use autodoc on RTD, as importing fails. Scipy is a bit of a special package as it cannot be installed via pip if numpy is not already present (i.e. using a requirements.txt is not an option), as its setup.py already imports from numpy.

Owner

ericholscher commented Sep 10, 2012

On the build server:

python-numpy is already the newest version.
python-matplotlib is already the newest version.
python-scipy is already the newest version.

Is this still an issue?

I still get an import numpy error:
Exception occurred: File "/home/docs/sites/readthedocs.org/checkouts/readthedocs.org/user_builds/pyspeckit/checkouts/latest/pyspeckit/spectrum/classes.py", line 17, in <module> import numpy as np ImportError: No module named numpy The full traceback has been saved in /tmp/sphinx-err-2kglGL.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. Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>, or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!

I still haven't figured out if I'm doing something wrong or numpy really isn't there.

@ghost

ghost commented Sep 10, 2012

I think the problem arises because of issue #218: You cannot use the installed numpy/scipy/matplotlib packages if you build your project in a virtualenv.

njsmith commented Sep 10, 2012

@ericholscher: Yep, seems to be working now: http://readthedocs.org/builds/patsy/249222/ - thank you!

@keflavich: I think @brian-git is correct -- as you can see from the log above, building without a virtualenv seems to be working now. Fixing #218 is probably an hours work or something, but I don't know when I'll ever have a chance to look at it, since I only really need numpy.

@njsmith njsmith closed this Sep 10, 2012

megies commented Sep 12, 2012

Figuring this out has cost me quite some time before I found this issue. I think there should be a note in the project settings clearly stating that system site-packages are not present when checking the virtualenv setting.

@bfroehle bfroehle referenced this issue in ipython/ipython Sep 13, 2012

Merged

unmock read-the-docs modules #2401

alansaul commented Feb 8, 2013

This appears to be working for numpy and scipy but doesn't seem to work for matplotlib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment