[Python] How to use pip to install packages using MinGW-w64 compiler on Windows 7?

Discussão em 'Python' iniciado por Stack, Março 26, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Python 3.4.1 64 bit on Windows 7. When I tried to install scikit-image using pip, I ran into the popular problem: "unable to find vcvarsall.bat". I made sure that I have both Visual Studio 2009 and 2010 redistributable installed and also added VS90COMNTOOLS and VS100COMNTOOLS to environment variable. But that didn't help. The same error persisted.

    Then I decided to give MinGW-w64 a try. So I installed it. Add the bin folder to PATH. Then create a distutils.cfg file that has this code

    [Build]
    compiler = mingw-w64


    Then I get this error message: "don't know how to compile C/C++ code on platform 'nt' with 'mingw-w64' compiler". How should I solve this?

    P.S I know I can download binaries from Christoph Gohlke's page, but I'd still like to know how to do this on my own.

    Continue reading...

Compartilhe esta Página