I have a GC420t Zebra label printer and would like to connect it to the Pi 4 for printing information generated by a Python script. It is USB.

Have followed this guide https://www.cs.cmu.edu/afs/.cs.cmu.edu/help/content/printing/unix_linux_printing.html and also this one https://www.thegeekdiary.com/lpr-command-not-found/ which uses the command lpr, without success (I get no python errors when using os.system('lpr ' + FileToPrint).

I also don't see the printer "mounted" on the Raspian desktop (as I see any USB stick). Any tips on why this does not work?

also: doing sudo lpstat -s https://smallbusiness.chron.com/list-printers-ubuntu-command-line-57593.html doesn't show any printer.

also: no other Q/A on this website helped me.

  • There are tools such as dmesg and lsusb which show what Linux knows about the device.
    – joan
    Mar 15, 2023 at 16:40
  • 1
    With search keywords "GC420t Zebra label printer linux" I found (among others) supportcommunity.zebra.com/s/article/…
    – Bodo
    Mar 15, 2023 at 16:48
  • Mr Bodo, I have read and followed such guide before, but still nothing. Doing os.system('lpr -P GC420t ' + FileToPrint) returns "Unknown GC420t printer. I have set it to be my primary printer. Mar 15, 2023 at 18:02
  • Don't take this the wrong way but it is a bit obtuse to discuss this in the context of a python system call when just using the CLI command is simpler, clearer, and more definitive.
    – goldilocks
    Mar 15, 2023 at 18:25
  • "The CUPS driver is directly built-in on the Mac OS and some Linux versions." -> I'd take this to mean it involves proprietary source code that is not publicly available, and hence the driver only exists on platforms they distribute a binary for, and they don't do it for linux ARM systems.
    – goldilocks
    Mar 15, 2023 at 18:31

1 Answer 1


Turns out CUPS was the answer, I found and cofigured my printer using it: https://www.circuitbasics.com/how-to-print-in-raspberry-pi-using-cups/ . And also using lp instead of lpr: os.system('lp -d GC420t '+ currentfile) (where GC420t is my printer and currentfile holds the path to the field being printed.

  • Can you please share your python code which you are using to create ZPL file for Zebra printer? thanks. Aug 10, 2023 at 4:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.