You need to download the qrcode library beforehand, otherwise it will not work.
Create QrCode with Python