After the installation PIL-1.1.7, and JCC-2.14I tried to install pyqrcode-0.2.1from sources you, but also faced with the same error:
ImportError: No module named _qrcode. But then I noticed what _qrcodelib ( _qrcode.so) really is . So I tried adding it to my library path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python2.7/site-packages/qrcode-0.2.1-py2.7-linux-x86_64.egg/qrcode/
And it worked! Well, actually, not really, I ran into another error:
AttributeError: 'module' object has no attribute '_setExceptionTypes'
So I edited the file __init__.py
/usr/local/lib/python2.7/site-packages/qrcode-0.2.1-py2.7-linux-x86_64.egg/qrcode/
/Library/Python/2.7/site-packages/qrcode-0.2.1-py2.7-macosx-10.7-intel.egg/qrcode/
and commented on line 21:
Then I was able to run their simple example:
import sys, qrcode
e = qrcode.Encoder()
image = e.encode('woah!', version=15, mode=e.mode.BINARY, eclevel=e.eclevel.H)
image.save('out.png')
(: http://pyqrcode.sourceforge.net/)
, ,