a=qrcode.make("www.baidu.com")
a.save("百度")
错误提示:
D:\python\venv\Scripts\python.exe D:/python/erweima.py
Traceback (most recent call last):
File "D:\python\venv\lib\site-packages\qrcode\image\pil.py", line 6, 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 "D:/python/erweima.py", line 2, in <module>
a=qrcode.make("www.baidu.com")
File "D:\python\venv\lib\site-packages\qrcode\main.py", line 11, in make
return qr.make_image()
File "D:\python\venv\lib\site-packages\qrcode\main.py", line 288, in make_image
from qrcode.image.pil import PilImage
File "D:\python\venv\lib\site-packages\qrcode\image\pil.py", line 8, in <module>
import Image
ModuleNotFoundError: No module named 'Image'
Process finished with exit code 1
1 个解决方案
#1
qrcode需要 Pillow库 支持。
pip install Pillow 试试。
pip install Pillow 试试。
#1
qrcode需要 Pillow库 支持。
pip install Pillow 试试。
pip install Pillow 试试。