title: RuntimeError: latex program is not installed
body: <p>I am trying to display LaTex.
  I want to create a python project with Tkinter where the user enters an equation and receives a solution. For this I'm trying to learn how to use LaTex.</p>
  <p>I copied this code from another question on StackOverflow:</p>
  <pre><code>import sympy as sp
  import tkinter as tk
  from io import StringIO, BytesIO
  from PIL import Image, ImageTk
  
  x,y = sp.symbols('x,y')
  expr = sp.sin(sp.sqrt(x**2 + 20)) + y
  
  f = BytesIO()
  sp.preview(expr, viewer='BytesIO', outputbuffer=f)
  f.seek(0)
  root = tk.Tk()
  img = Image.open(f)
  pimg = ImageTk.PhotoImage(img)
  lbl = tk.Label(image=pimg)
  lbl.pack()
  root.mainloop()
  </code></pre>
  <p>I downloaded MikTex, but I still receive this error -</p>
  <pre><code>RuntimeError: latex program is not installed
  </code></pre>
  <p>I run my code with pycharm.
  How can I fix this?
  any ideas ?</p>