0

I made a Colab Notebook to work with the symbolic representations of the SymPy Python library, when I downloaded it and passed it to Jupyter Notebook I saw that the dictionaries cannot be used in Pretty Printing. Any help?

The code is exactly the same. Colab Notebook: SymPy Version: 1.1.1 Jupyter Notebook: SymPy Version: 1.7.1

If the difference is in the version, how can I make it look in Jupyter Notebook?

Thanks in advance.

PD: I leave some images below:

Jupyter Notebook:

Google Notebook:

Caconde
  • 4,177
  • 7
  • 35
  • 32
  • First check if it's a problem with printing/rendering [as described here](https://stackoverflow.com/q/52010001/827519). If that doesn't work, [maybe upgrading the sympy version](https://colab.research.google.com/notebooks/snippets/importing_libraries.ipynb) in colab can fix it. – wsdookadr Dec 26 '20 at 21:34
  • 1
    I upgraded it and in Colab still looks like the picture. But in any case the problem is not in the google colab if not in Jupyter Notebook. Thank you for your answer! – juanjofndz Dec 27 '20 at 09:08

1 Answers1

0

Finally, I used Ipython.display.Math and Ipython.display.display to solve it.

with the same example:

import sympy as sp    
from IPython.display import display, Math

...  

display(Math(sp.latex(precond_1_5)))