How can I install cython

cython, download, python, python-3.x, windows

Solution

Cython is now available on PyPI as pre-built binary wheel packages. On Windows and any other platform with an existing wheel, compilation is no longer necessary. You can now just do:

pip install Cython

Obsolete answer

Cython is a binary package. This means it is not written entirely in Python. Part of it is in a language that compiles to native binaries, such as C or C++. `vcvarsall.bat` is a Microsoft script for calling a compiler for C or C++ code. In other words, you don't have a compiler installed on your system (or at least, Python can't find it).

Your options include:

- Install a C/C++ compiler and make sure Python can find and use it

- Find a prebuilt binary of this library

The latter will be simpler. You can find the binary here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#cython. Download the binary that corresponds to your bitness and Python version. For example, if you're using Python 3.4 and your system is 32-bit, you would download `Cython‑0.21.1.win32‑py3.4.exe`. Save this to a location where you know the path. (One simple choice is just saving it to the `C:\` directory.) Then run `easy_install` on the downloaded file, similar to this:

easy_install C:\Cython‑0.21.1.win32‑py3.4.exe

(Make sure you change the paths in that command to match the actual file paths.)

Problem

In the process of installing Kivy on Windows, I found that I needed Cython. - I tried installing it using `easy_install cython`, but this gave the following error: `error: Unable to find vcvarsall.bat` - I downloaded the package from Cython's official page, but when trying to run `python setup.py install`, I saw the same errors. How can I install Cython? Without this 'vcvarsall.bat' error. I am running Windows 32 bit.

Original source

Related problems