I just loaded up a notebook that I last used with IPython < 4.0 and the MathJax math from SymPy output is failing to load. I'm getting this 404:
[W 16:47:28.747 NotebookApp] 404 GET /static/components/MathJax/jax/element/mml/optable/BasicLatin.js?rev=2.5.3 (127.0.0.1) 10.63ms referer=http://localhost:8888/notebooks/n01_dynamics_overview.ipynb
My previous method for installing MathJax was to do this:
In [1]: from IPython.external import mathjax
In [2]: mathjax.install_mathjax()
I see from some issues that that may not be correct anymore.
The install_mathjax() function is gone, because MathJax should now be bundled with the notebook. How did you install/upgrade?
I am using conda to upgrade IPython.
Odd, that shouldn't have this issue. Can you dig into your installation directory and find out how much of the 404'd path is missing. It's rooted in the notebook package directory, i.e.:
import notebook
os.path.join(os.path.dirname(notebook.__file__), 'static/...')
This is all I find in the jax dir:
moorepants@garuda:eme185-website(master)$ ls /home/moorepants/miniconda3/lib/python3.5/site-packages/notebook/static/components/MathJax/jax/
input output
Here is the complete tree:
moorepants@garuda:eme185-website(master)$ tree /home/moorepants/miniconda3/lib/python3.5/site-packages/notebook/static/components/MathJax/jax/
/home/moorepants/miniconda3/lib/python3.5/site-packages/notebook/static/components/MathJax/jax/
โโโ input
โย ย โโโ TeX
โย ย โโโ config.js
โย ย โโโ jax.js
โโโ output
โโโ HTML-CSS
โโโ autoload
โย ย โโโ annotation-xml.js
โย ย โโโ maction.js
โย ย โโโ menclose.js
โย ย โโโ mglyph.js
โย ย โโโ mmultiscripts.js
โย ย โโโ ms.js
โย ย โโโ mtable.js
โย ย โโโ multiline.js
โโโ config.js
โโโ fonts
โย ย โโโ STIX-Web
โย ย โโโ Alphabets
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Arrows
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ DoubleStruck
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ fontdata-extra.js
โย ย โโโ fontdata.js
โย ย โโโ Fraktur
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Latin
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Main
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Marks
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Misc
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Monospace
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Normal
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โโโ Main.js
โย ย โโโ Operators
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ SansSerif
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Script
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Italic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Shapes
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ BoldItalic
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Size1
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Size2
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Size3
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Size4
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Size5
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Symbols
โย ย โย ย โโโ Bold
โย ย โย ย โย ย โโโ Main.js
โย ย โย ย โโโ Regular
โย ย โย ย โโโ Main.js
โย ย โโโ Variants
โย ย โโโ Bold
โย ย โย ย โโโ Main.js
โย ย โโโ BoldItalic
โย ย โย ย โโโ Main.js
โย ย โโโ Italic
โย ย โย ย โโโ Main.js
โย ย โโโ Regular
โย ย โโโ Main.js
โโโ imageFonts.js
โโโ jax.js
83 directories, 70 files
I see a similar set of files. So I think you have the right files, but it's trying to load something it shouldn't. That could be because:
To test 1: does Mathjax work on other things, like a simple $x=1$ in a Markdown cell?
To test 2: try running the notebook server with --port 8999 (or any number other that the normal port), which should avoid browser cache.
I have been having the issue with /static/components/MathJax/jax/element/mml/optable/BasicLatin.js not being found on Mac OS X with the conda install of notebook etc. Basic math works, and it is not a cache issue (using a different port has the same problem.) Seems to be an issue on fresh python 2 and 3 environments.
Same issue here, persists through fresh anaconda install. My notebook doesn't work under Safari but works under Chrome. I tried emptying the cache and restarting the browser, but no luck.
My error message:
[W 22:48:18.498 NotebookApp] 404 GET /static/components/MathJax/jax/output/SVG/fonts/TeX/fontdata.js?rev=2.6.0
I'm using Python 3.5 on OS X 10.11.4.
EDIT: I have since solved the problem. It required clearing all website data through "Settings > Privacy > Remove all website data" instead of removing the cache through "Develop > Empty caches".
I am having a similar issue, but with another Mathjax library : mathchoice.js
python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': '1ba246d',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/home/vagrant/.virtualenvs/venvpy3/lib/python3.4/site-packages/IPython',
'ipython_version': '5.0.0',
'os_name': 'posix',
'platform': 'Linux-3.13.0-45-generic-x86_64-with-Ubuntu-14.04-trusty',
'sys_executable': '/home/vagrant/.virtualenvs/venvpy3/bin/python',
'sys_platform': 'linux',
'sys_version': '3.4.3 (default, Jul 28 2015, 18:20:59) \n[GCC 4.8.4]'}
os.path.join(os.path.dirname(notebook.__file__), 'static/...')
Out[3]: '/home/vagrant/.virtualenvs/venvpy3/lib/python3.4/site-packages/notebook/static/...'
I'm having a similar issue,
[W 20:22:36.138 NotebookApp] 404 GET /static/components/MathJax/jax/output/SVG/fonts/TeX/fontdata.js?rev=2.6.0 (::1)
Everything seems to be working, except for rendering to SVG. Would be helpful for porting some equations from my RISE presentation to a ppt. Choosing that gets a _[Math Processing Error]_
We do remove some rendering options from Mathjax to keep the package size down - that may have been one of those.
Similar 404 error using notebook 4.2.3, jupyter_core 4.2.0.
[W 12:56:03.971 NotebookApp] 404 GET /static/components/MathJax/jax/element/mml/optable/BasicLatin.js?rev=2.6.0 (::1) 7.89ms referer=http://localhost:8888/path/mynotebook.ipynb
I fixed it by copying the .../element directory from Anaconda's Spyder package into /usr/local/share/anaconda/lib/python3.5/site-packages/notebook/static/components/MathJax/jax.
On my system, .../element/* sums to about 135 KB. Perhaps worth including in Notebook's version?
/usr/local/share/anaconda/lib/python3.5/site-packages/spyderlib/utils/inspector/js/mathjax/jax
โโโ element
โย ย โโโ mml
โย ย โโโ jax.js
โย ย โโโ optable
โย ย โโโ Arrows.js
โย ย โโโ BasicLatin.js
โย ย โโโ CombDiacritMarks.js
โย ย โโโ CombDiactForSymbols.js
โย ย โโโ Dingbats.js
โย ย โโโ GeneralPunctuation.js
โย ย โโโ GeometricShapes.js
โย ย โโโ GreekAndCoptic.js
โย ย โโโ Latin1Supplement.js
โย ย โโโ LetterlikeSymbols.js
โย ย โโโ MathOperators.js
โย ย โโโ MiscMathSymbolsA.js
โย ย โโโ MiscMathSymbolsB.js
โย ย โโโ MiscSymbolsAndArrows.js
โย ย โโโ MiscTechnical.js
โย ย โโโ SpacingModLetters.js
โย ย โโโ SuppMathOperators.js
โย ย โโโ SupplementalArrowsA.js
โย ย โโโ SupplementalArrowsB.js
โโโ input
[...]
โโโ output
I had this same problem:
404 GET /static/components/MathJax/jax/output/SVG/fonts/TeX/fontdata.js?rev=2.6.0
Workaround was to copy the ../TeX folder from another MathJax installation into the right spot in the notebook folder within site-packages.
It looks like people have reported several similar but distinct errors here. I suspect it may depend on what math you're displaying in the notebook. Does anyone have a sample notebook that consistently reproduces the error?
In my case, there's a distro dependency: I'm running Debian testing, mathjax is installed in /usr/share/javascript/mathjax/ and is provided by the libjs-mathjax debian package. There is no mathjax under any directory called notebook or jupyter that I can find. This more or less makes sense: you would not want to install two copies of mathjax: one in jupyter, another that is a system-wide version.
However, this points to a package-maintainance bug; in my case, the error is far more basic:
[W 17:50:59.672 NotebookApp] 404 GET /static/components/MathJax/fonts/HTML-CSS/STIX-Web/woff/STIXMathJax_Main-Italic.woff?V=2.7.0 (127.0.0.1) 2.31ms
and STIX is simply just not installed... because debian doesn't package STIX. go figure.
@linas That sounds like an issue with Debian's packaging. We recommend installing the notebook with pip or conda, because Debian's version will often be out of date. Or even broken, apparently. ;-)
If you want to use Debian's packages, here is where to file bugs against them.
Actually, it looks like Debian packages symlink mathjax in.
Thanks, yes, sorry, I think I just confused the original issue. Side comment: I searched high & wide for a debian package containing STIX fonts, and found none. Installing them by hand did not solve my other issues, so my comments are a red herring.
@takluyver To consistently reproduce the error try this notebook. Heavy use of TeX, triggers the following 404 errors for me:
[W 22:44:04.464 NotebookApp] 404 GET /static/components/MathJax/jax/element/mml/optable/BasicLatin.js?rev=2.6.0 (::1) 1.78ms referer=http://localhost:8888/index.ipynb
[W 22:44:05.629 NotebookApp] 404 GET /static/components/MathJax/jax/element/mml/optable/MathOperators.js?rev=2.6.0 (::1) 1.56ms referer=http://localhost:8888/index.ipynb
[W 22:44:26.582 NotebookApp] 404 GET /static/components/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf (::1) 1.65ms referer=http://localhost:8888/index.ipynb
[W 22:44:26.584 NotebookApp] 404 GET /static/components/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf (::1) 1.43ms referer=http://localhost:8888/index.ipynb
I am now on Jupyter 4.3, Jupyter Notebook 5.0.
I have the same issue and _solved it_!
_404 GET /static/components/MathJax/jax/output/CommonHTML/fonts/TeX/fontdata.js?V=_2.7.5
go to MathJax release page download MathJax 2.7.5
copy the file in MathJax-2.7.5\jax just downloaded to python37\Lib\site-packages\notebook\ static\components\MathJax\jax and the notebook work well when renderer formula to svg!

For the error message which not refer to this path, just copy&paste with corresponding path.
Most helpful comment
I have the same issue and _solved it_!
go to MathJax release page download MathJax 2.7.5
copy the file in
MathJax-2.7.5\jaxjust downloaded topython37\Lib\site-packages\notebook\ static\components\MathJax\jaxand the notebook work well when renderer formula to svg!For the error message which not refer to this path, just copy&paste with corresponding path.