Skip to content

Instantly share code, notes, and snippets.

@nickretallack
Created September 9, 2014 18:23
Show Gist options
  • Save nickretallack/ede56cc5893b1334e2fc to your computer and use it in GitHub Desktop.
Save nickretallack/ede56cc5893b1334e2fc to your computer and use it in GitHub Desktop.
$ pip install pillow
Downloading/unpacking pillow
Downloading Pillow-2.5.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl (3.0MB): 3.0MB downloaded
Installing collected packages: pillow
Successfully installed pillow
Cleaning up...
$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import qrcode
>>> qrcode.make("hello").tobytes("png")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/nickretallack/virtualenvs/admin/lib/python2.7/site-packages/PIL/Image.py", line 647, in tobytes
e = _getencoder(self.mode, encoder_name, args)
File "/Users/nickretallack/virtualenvs/admin/lib/python2.7/site-packages/PIL/Image.py", line 430, in _getencoder
raise IOError("encoder %s not available" % encoder_name)
IOError: encoder png not available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment