Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QR Codes
#1
Hi all,
I'm trying to generate qr codes in python. I have downloaded and did a pip install of qrcode on the pypi site.
The starter code on the site is:
import qrcode
import qrcode.image.svg
img = qrcode.make('Sacmap')
type(img) #qrcode.image.pil.PilImage
img.save('Sacmap pic.svg')
I keep getting this error:
Error:
Traceback (most recent call last): File "C:/Users/araki/QR_C0DE/qrcode.py", line 2, in <module> import qrcode File "C:\Users/araki/QR_C0DE\qrcode.py", line 3, in <module> import qrcode.image.svg ModuleNotFoundError: No module named 'qrcode.image'; 'qrcode' is not a package >>>
So, the question is where is 'pil' and why don't I have it installed in my default folder?

Thanks for any help,
"Human history becomes more and more a race between education and catastrophe." - H. G. Wells (1866-1946)
Reply


Messages In This Thread
QR Codes - by deep_logic - Jun-20-2022, 09:44 PM
RE: QR Codes - by bowlofred - Jun-21-2022, 07:03 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020