What is the most complete way to install python in Windows?


I know this question can be interpreted as a discussion, so I did it with the word "complete" rather than "better."

I'm a python user in GNU / Linux and here it comes more or less preinstalled. Still, I can use pip to install or remove new packages, creating a complete installation for my everyday use (virtualenv, scientific computing packages and other development libraries, tkinter type).

I've seen a lot of python questions in Windows (SOEN has a lot of them, some pop up here in SOPT), and I know there's a version of python (both 2.7 and 3.x) for installation from the site of the language itself, as well as some packages for scientific computing .

I imagine the answer will depend on my application. Considering two distinct environments:

  • Scientific Computing (in which case which of the two applications listed above is the most complete?)

  • Business Development Environment (here, I have no idea)

What kind of tools are there for MS Windows that allow me to have a good python development environment in a simple, fast and complete way?

And, is there anything equivalent to PIP for Windows?

asked by anonymous 31.12.2013 / 14:32

4 answers


One of the biggest difficulties in installing Python packages in Windows is that the resources needed to compile them from sources are not always present. This causes problems when installing certain packages via PIP, so some manual intervention is needed.

From my personal experience (Python 2.7 on Windows XP), the steps for configuring a Python environment would be:

  • Install Python itself from your official site ;
  • Install setuptools from a binary for Windows a>;
  • Install pip , from a binary for Windows a>;
  • Place the folder where the pip is (eg C:\Python27\Scripts ) in PATH (optional);
  • For each package you want to install:
  • Try to install by pip: pip install pacote .
  • If the installation fails, look for a binary for Windows on Google.
  • Unfortunately, from my personal experience I can say that this step 5.2 is more frequent than I would like to ... Pure python packages like Django usually install well through pip, but those that require a native interface (in general via C) often fail frequently.

    As for finding binaries, I usually just google it, but on this site has a good list of binaries for both Windows 32bits and 64bits. Some of the packages I needed for commercial development (eg ReportLab - PDF generation, psycopg2 - interface with Postgres, mod-wsgi - interface with Apache, etc.) as well as some scientific computing (NumPy, SciPy, PyEphem etc.) and many others are available in this list.

    31.12.2013 / 19:46

    I would advise you to study a little about Vagrant or some tool that will be able to provision various environments isolated from your operating system.

    You may well work on windows and your desktop is provisioned by a ubuntu, for example.



    03.01.2014 / 15:09

    I came to cite the Anaconda .

    Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 195 of the most popular Python packages for science, math, engineering, data analysis.

    This distribution comes with the Spyder IDE, which resembles the MATLAB interface.

    Python versions available: 2.7 and 3.4

    16.06.2015 / 04:28

    In the main implementation of the Python language, CPython, also known as "reference implementation", the interpreter is written in ... guess what ?! C.

    CPython is also famous for allowing easy access to C libraries, either when performance tuning is required or serving as a glue language between low-level libraries.

    And then the community uses this feature a lot ... did it lack performance? Go down to the C, and follow the life. It is so with PIL, PyCrypto, simplejson, to name a few. Fantastic!

    Who programs in an environment where gcc is available is easy, there is no disorder. But who needs to use Windows suffers a lot, since CPython in this platform is officially compiled in MS Visual Studio.

    When you install a package that has code in C, the installation process will automatically try to find a compiler. If you do not have a compiler configured, you get an error similar to this:

    Unable to find vcvarsall.bat

    The solution is to either get a binary version of the package (with an executable installer you simply click Next, Next, Finish!), or configure a compiler on your machine.

    If you intend to develop in Python, I highly recommend having a compiler installed . The options in Windows are: Visual Studio or MinGW . As a compiler, pip is in charge of requesting the build from the sources, it is much easier than looking for a binary *.

    I have a post on how to install Python on Windows and configure a compiler: link

    • Some projects give work to compile by depending on other libraries that need to be in the environment, but they are not the majority, and you can always resort to a binary distribution if the pip does not work.
    05.05.2015 / 15:56