Sort:  

applies, I forgot to say at the beginning that we need to execute the following commands to install these two libraries

pip install pillow
pip install qrcode