To run both scripts, you need to install the respective Python packages.
pip install pillowFor more information:
https://pypi.org/project/pillow/
https://pillow.readthedocs.io/en/stable/installation.html
pip install qrcodeFor more information:
https://pypi.org/project/qrcode/
Then enter the required data in the script and run it.
Follow the comments in the code for guidance.
That's it! :)