I'd like to use aggdraw with Python 2.7. (Is this a dumb idea anyway? I've seen a nice aggdraw example, but I don't want to regress to Python 2.6. Is there an equivalent drawing library working with Python 2.7?) I have Python 2.7.8 64bit installed on a Windows 7 Enterprise SP 1 64bit.
The installer at http://www.effbot.org/downloads#aggdraw complains about Python 2.6 missing, and python setup.py install
complains about a missing vcvarsall.bat
.
So, following all the related posts here, I installed the MS compiler from http://www.microsoft.com/en-us/download/details.aspx?id=44266. It's visible in the "Programs and Features" list, and I have a vcvarsall.bat
in C:\Users\d031475\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0
now.
Still, python setup.py install
neither runs in CMD directly, nor in the MS Visual... Compiler for Python 2.7
command prompt which appeared in my Start menu. It still complains about a missing vcvarsall.bat
.
EDIT: Even when I append the relevant directory to my path, so that I can run vcvarsall.bat
from the command line, python setup.py install
still complains it can't find it. How strange is that?
To build with "Microsoft Visual C++ Compiler for Python 2.7" you need to use setuptools >= 6.0 instead of distutils. Try to change the line
from distutils.core import setup, Extension
insetup.py
tofrom setuptools import setup, Extension
.You'll need to build against the freetype library to enable text rendering.
The aggdraw project appears to be abandoned. The latest version 1.2a3 is from early 2006 and predates Python 2.7, 64 bit, and Pillow. Expect crashes, especially on 64 bit for Windows.
Unofficial Windows binaries for aggdraw are available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#misc.
An alternative to aggdraw is pycairo (Windows binaries).