Has anyone managed to install QuTIP 2.2.0 with an existing Python 2.7.5 distribution (on Win7)? The instruction manual suggests that I need to install Python(x,y) first, but the instructions are pretty vague. I'm still a Python newbie.


Understanding installation instructions

The installation instructions are pretty clear, but I remember the times, I got lost in those short lines assuming I know something obvious.

I will try translating it

  • install Python(X,Y) - do it. Follow the link, download the exe file and run it.
    • Do not forget to set the options, following defaults will fail, Cython option must be included.
  • edit the distutils.cfg file as instructed
  • download tar.gz archive for QuTIP from PyPi, unpack it in some directory, cd into it to be in the directory, where you see setup.py, and run $ python setup.py install

The distutils.cfg refers to mingw32, this is needed for compilation. If it is not installed with Python(X,Y), you would have to install it separately. Be careful and install proper version, even on 64 bit systems use 32 bit one (this I assume from proposed name of compiler in config).

Good luck. I am not on Windows for about 2 years, so I cannot confirm, it works, but I hope, it will move you on.


I also had a lot of problems installing it correctly. Here is my working solution.

As the installation instructions suggest:

  1. Install PythonXY (I am using (including Cython package) (Edit: The newer versions of PythonXY do not include a compiler. Try installing from here instead: https://code.google.com/p/pythonxy/wiki/AdditionalPlugins)
  2. Edit C:\Python27\Lib\distutils\distutils.cfg to include:

    [build] compiler = mingw32

    [build_ext] compiler = mingw32

  3. Add C:/MinGW32-xy/bin to your PATH. It has to be before other paths with e.g. gcc in them. You can do this:

    set PATH=C:/MinGW32-xy/bin;%PATH%

for a temporary add (in that console) or use the answer here. For a permanent change go properties of your Computer. Go to advanced system settings --> Environment Variables. Change the System Variable to have the MinGW path as the first entry. It doesn't work if it is last or in the user path!

  1. Run a Python interpreter:

    import qutip; qutip.testing qutip.testing.run()

If it doesn't crash on the 7th test you probably have a working copy of qutip. I get 320 test in 2194.236s and SKIP=7, errors=5.

Details of which tests failed for my can be seen here.


I would use Anaconda 2.7 with the added mingw and libpython libraries and then edit the distutils.cfg as stated. The skipped tests mentioned are fortran tests that you cannot run on windows, while the errors are time dependent tests that generate cython code at run time. If you follow the above suggestions then those tests will pass.


I've tried to install qutip for several hours, unsuccessfully. Fortunately, kind people from University of California have a solution:

wheels for lots of packages for python computing

This resource is not official, 'as is', but works better!

Type 'pip install package.whl' to download and build.

Your Answer

