I installed a QR Code Generator on my Server

apt upgrade -y
apt install pip3
apt install python-pip3
apt install python-pip
apt install python3-pip
pip3 install opencv-python qrcode numpy
apt install python3-opencv-python
apt install python3-opencv
apt install python3-qrcode
apt install python3-numpy
vi qr_gen.py
python
python3
which python3
vi qr_gen.py
chmod 755 qr_gen.py 
./qr_gen.py
l -rt
exit
  1. #!/usr/bin/python3
  2. import qrcode
  3. # example data
  4. data = "https://www.thepythoncode.com"
  5. # output file name
  6. filename = "site.png"
  7. # generate qr code
  8. img = qrcode.make(data)
  9. # save img to a file
  10. img.save(filename)