use captcha.image Under the ImageCaptcha Generate character captcha image , Just three lines of code
# Import captcha Under the bag image In the file ImageCaptcha class , Instantiate before using from captcha.image import
ImageCaptcha ic = ImageCaptcha() ic.write('1a8c', '1a8c' + '.png', format='png')