lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.27k stars 662 forks source link

ModuleNotFoundError: No module named 'Image' #281

Closed YueLiXing closed 1 year ago

YueLiXing commented 1 year ago

user pip3 install qrcode install qrcode.

image

but not found

image

Raam124 commented 1 year ago

just install pillow separately pip install Pillow

bnlcas commented 1 year ago

This does feel like a bug. If there is any interest I would be happy to patch in a PR to resolve this dependency in the installation.

SmileyChris commented 1 year ago

zsh has special meanings for square brackets -- you'll have to escape them (either with quotes pip install "qrcode[pil]", or with a leading slash pip install qrcode\[pil\])

Alternatively, you could add this to your .zshrc:

alias pip='noglob pip'
bnlcas commented 1 year ago

@SmileyChris - thank you for the explanation here (learn something new everyday). Would it be possible to make an edit to this effect in setup instructions in the Readme file? This feels like it is going to be a common stumbling point for anyone following the setup instructions on a Mac.

SmileyChris commented 1 year ago

Yep that seems like a good idea, do a pull request to put quotes around that in the readme. 👍