我正在尝试在我的 django 应用程序中使用 Django-simple-captcha http://django-simple-captcha.readthedocs.org/en/latest/usage.html 。但是验证码图像没有显示在模板中。在浏览器中查看源代码时出现以下错误。我已经仔细阅读了文档并拥有了所有的同步数据库。
Traceback:
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Library/Python/2.7/site-packages/captcha/views.py" in captcha_image
46. font = ImageFont.truetype(settings.CAPTCHA_FONT_PATH, settings.CAPTCHA_FONT_SIZE * scale)
File "/Library/Python/2.7/site-packages/PIL/ImageFont.py" in truetype
228. return FreeTypeFont(font, size, index, encoding)
File "/Library/Python/2.7/site-packages/PIL/ImageFont.py" in __init__
131. self.font = core.getfont(font, size, index, encoding)
File "/Library/Python/2.7/site-packages/PIL/ImageFont.py" in __getattr__
42. raise ImportError("The _imagingft C module is not installed")
Exception Type: ImportError at /captcha/image/f02c7bf84cd31c4caf8d6b2f8931a01689902c83/
Exception Value: The _imagingft C module is not installed
我知道这个问题之前已经被问过好几次了,我已经阅读了几个 stackoverflow 的答案,但我仍然对行动的过程感到非常困惑。
我已经在我的 OSX Mavericks 上安装了 Pillow。