title: How to get cython to use MinGW with enthought canopy distribution
body: <p>I just downloaded Enthought's Canopy academic version and installed Cython and MinGW (along with a lot of other packages) and want to use some cython code in the ipython notebook via cell magic %%cython that I had written previously. Also I am using Windows 7 64-bit.</p>
  
  <p>Except I get this:</p>
  
  <pre><code>DistutilsPlatformError: Could not find Visual Studio 2008 in your path.
  
  If you do not have Visual Studio 2008 installed, you can use
  the MinGW compiler instead. To install mingw, do:
      enpkg mingw
  To use the MinGW compiler to build an extension module, use
  the '-c' flag, e.g.:
      python setup.py build_ext -c mingw64
  Note that building Python extensions with MinGW is not officially
  supported, although it is known to work in many cases.
  </code></pre>
  
  <p>This is mentioned right in the Cython docs that this will happen if mingw is not added to PATH. I feel like this was much easier with Anaconda but here's what I've done so far:</p>
  
  <p>I've tried adding these to my path:</p>
  
  <p><code>C:\Users\Patrick\User\EGG-INFO\mingw\usr\x86_64-w64-mingw32\bin</code></p>
  
  <p><code>C:\Users\Patrick\User\EGG-INFO\mingw\usr\bin</code></p>
  
  <p><code>C:\Users\Patrick\User\Lib\site-packages\mingw-4.8.1-2.egg-info\scripts</code></p>
  
  <p>What do I have to do to get Cython to use mingw with EPD?</p>