How to get Latex-style output from sympy in Spyder IPython console?
anaconda, latex, python, spyder, sympy
Solution
When I execute the above code in IPython, I get graphical (image) output x^2/2, but not latex. This means sympy did not find Latex, and used next best thing, which is matplotlib in my case, right ?
That's correct.
I’m not sure how to proceed to get Latex-style output, can I install some package trough Anaconda to automatically upgrade to Latex output, or I have to manually install some Latex distribution on my operating system like MiKTeX ?
There's no other package in Anaconda (besides `matplotlib`) that gives you Latex output, which means (as you correctly guessed) that you need to install Miktex to get it.
Problem
I using sympy in Spyder and would like Latex output for symbolic computations in IPython console. I have installed Spyder trough Anaconda and created a separate environment. At first I was getting only ASCII pretty printer output, but after installing matplotlib in that environment I can also get nicer graphical output. ``` from sympy import init_printing init_printing() integrate(x) ``` When I execute the above code in IPython, I get graphical (image) output x^2/2, but not latex. This means sympy did not find Latex, and used next best thing, which is matplotlib in my case, right ? I’m not sure how to proceed to get Latex-style output, can I install some package trough Anaconda to automatically upgrade to Latex output, or I have to manually install some Latex distribution on my operating system like MiKTeX ?