Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Installing the Microsoft Visual C++ 2008 Redistributable Package is not sufficient to compile packages. You need to install a <em>compiler</em>, not just the support files.</p> <p>There are three ways to do this:</p> <ol> <li>Install Visual C++.</li> <li>Use mingw's port of gcc instead of Visual C++.</li> <li>Use cygwin's port of gcc instead of either, and a cygwin build on Python instead of the native one.</li> </ol> <hr> <p>If you want to go with option 1, you need to install Visual C++ itself. The free version should work just as well as the paid version, as long as you're not going to build binary packages to redistribute to others. Unfortunately, I'm not sure where to find the 2008 version anymore. As of May 2013, <a href="http://www.microsoft.com/visualstudio/eng/downloads" rel="nofollow noreferrer">the download page</a> only has 2010 and 2012.</p> <p>When you install this, it will create a batch file called <code>vcvarsall.bat</code> (not <code>vcvarshall.bat</code>!), and give you the option of putting that batch file in your PATH. Running that batch file sets up a DOS prompt for building with that version of Visual C++. (This is handy if you have multiple versions of Visual C++, or other compilers, around.) If you skip that option, you will have to do it manually.</p> <p><a href="https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat">This question</a> shows how to use a newer Visual Studio with older Python, and also shows how to point distutils at a <code>vcvarsall.bat</code> that's not on your PATH, and has links to a whole lot of other relevant questions and blog posts.</p> <hr> <p>Many people find option 2 simpler. Install <a href="http://sourceforge.net/projects/mingw/" rel="nofollow noreferrer"><code>mingw</code></a>, modify your PATH in the environment to include <code>C:\MinGW\bin</code> (or wherever you choose to install it), and pass <code>-c mingw32</code> whenever you run a <code>setup.py</code> script.</p> <p>The problem is that it's not as clearly documented how to tell <code>easy_install</code> and <code>pip</code> to use mingw instead of VC++. To do that, you need to find or create a <code>distutils.cfg</code> file, find or create a <code>[build]</code> section within it, and add <code>compiler=mingw32</code>. Not too hard. <a href="https://zignar.net/2012/06/17/install-python-on-windows/" rel="nofollow noreferrer">This blog post</a> looks like it explains things pretty well, or see <a href="https://stackoverflow.com/a/5051281/908494">this answer</a>.</p> <hr> <p>Option 3 is by far the simplest. Install <a href="http://www.cygwin.com" rel="nofollow noreferrer">cygwin</a>, tell it to install the Python and gcc packages, and you're done.</p> <p>The problem is that you don't have native Windows Python, you have a Unix Python running in a fake Unix environment on top of Windows. If you like Cygwin, you'll love this; otherwise, you won't.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload