install mathjax from already downloaded file #2262

stsci-sienkiew opened this Issue Aug 6, 2012 · 5 comments

4 participants


I don't like things that automatically download something and install it for two reasons: 1) I am not always confident that I have good configuration control over the installed software, and 2) it means I have to implement workarounds for machines that have restricted access to the network.

There is a module IPython.external.mathjax that will automatically download and install mathjax. It would be helpful if I could pass that function a file name, instead of having it select the URL it wants to download from. That is, I would like the choice of:

python -m IPython.external.mathjax

to automatically download and install, or

python -m IPython.external.mathjax mathjax.tar.gz

to install the file I already have downloaded and inspected.

If you agree to accept this feature, I will implement it for you. (If I understand github correctly, it will email me comments that you leave here.)

IPython member

I think your proposal is quite sensible, by all means proceed with a pull request.

I should note that it is already extremely easy to do this manually, by simply extracting the mathjax you downloaded to the appropriate location. This function is only there as an easy entry point for the most common mechanism (by far). We have no intention of suggesting that this function is the only way to install mathjax.


I had no idea how to install mathjax. The documentation only mentions the install_mathjax function. I added some information to the docs in my patch.

If I understand git/github well enough, I am about to send you a "pull request" that includes a method for installing mathjax from the command line as I described above. It includes code and documentation changes around this issue.


Regarding takluyver's comments: That looks like a good idea, but is a little beyond what I can get into right now. Someone who is doing regular development could do it, though.

Here is a related experiment: A similar approach could add a web server handler that serves mathjax directly from the zip file, reducing the >100 MB copy of mathjax to the ~16 MB of the zipped download. zip files are random access (unlike tar.gz) so it might even perform well. I'm not sure if it is worth the work to save only 100 MB of installed code size, though.

IPython member

This is now possible for a while, so closing.

@Carreau Carreau closed this Oct 5, 2014
@minrk minrk modified the milestone: 2.0, wishlist Oct 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment