title: How to run SageTeX on Windows?
body: <p>I want to use Sage in LaTeX, how do I do that running Sagemath 8.0 on Windows? I use the MikTeX distribution.</p>
  
  <p>I followed the instructions from <a href="http://doc.sagemath.org/html/en/tutorial/sagetex.html#sec-sagetex-install" rel="nofollow noreferrer">Sagemath</a> but they are for linux. I included the <code>sagetex</code> package, which generates a <code>myfile.sage</code> file but when I start the Sage shell and run <code>sage myfile.sage</code> it says</p>
  
  <pre><code>Traceback (most recent call last):
    File "myfile.sage.py", line 7, in &lt;module&gt;
      _st_ = sagetex.SageTeXProcessor('myfile')
    File "/opt/sagemath-8.0/local/lib/python2.7/site-packages/sagetex.py", line 76, in __init__
      raise VersionError, errstr
  sagetex.VersionError: versions of .sty and .py files do not match.
  myfile.sagetex.sage was generated by sagetex.sty version "None", but
  is being processed by sagetex.py version "2015/08/26 v3.0-92d9f7a".
  Please make sure that TeX is using the sagetex.sty
  from your current version of Sage; see
  http://www.sagemath.org/doc/installation/sagetex.html.
  </code></pre>