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.)