Closed bridger closed 2 years ago
It should be possible. Looking at it now...
It might be because of the way I'm installing qrcode. The latest code hasn't been released, so I'm installing by running:
pip install git+https://github.com/lincolnloop/python-qrcode@49060c484ce6d
Or, maybe that is a red herring... Here is the error I'm getting when importing qrcode:
>>> import qrcode
Traceback (most recent call last):
File "/opt/venv/src/qrcode/qrcode/image/styles/moduledrawers/pil.py", line 11, in <module>
from PIL import Image, ImageDraw
ModuleNotFoundError: No module named 'PIL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/venv/src/qrcode/qrcode/__init__.py", line 1, in <module>
from qrcode.main import QRCode
File "/opt/venv/src/qrcode/qrcode/main.py", line 16, in <module>
from qrcode.image.base import BaseImage
File "/opt/venv/src/qrcode/qrcode/image/base.py", line 4, in <module>
from qrcode.image.styles.moduledrawers.base import QRModuleDrawer
File "/opt/venv/src/qrcode/qrcode/image/styles/moduledrawers/__init__.py", line 2, in <module>
from .pil import CircleModuleDrawer # noqa: F401
File "/opt/venv/src/qrcode/qrcode/image/styles/moduledrawers/pil.py", line 13, in <module>
import Image
ModuleNotFoundError: No module named 'Image'
It's not, it's because of the backwards compatibility work I put into moduledrawers. I have a fix I'm pushing now..
I'm excited to see that there are now SVG module drawers! I upgraded from v6.1 to try them out. Previously I was able to use the SVG QR code without installing Pillow, but this time I wasn't able to import qrcode without installing Pillow as well. Is it still possible to use this package without the PIL dependency?
For reference, this is the little bit of Flask code I'm using to render the SVG with the new circle drawer.