I'm not sure about that. "lpr" is a common command used for printing (like "lp"). It's possible that you don't have that command installed on your Pi.I'm using https://pypi.org/project/zebra/ and https://pypi.org/project/zpl/. The code work perfectly on my windows machine.
I connected my Zebra ZD411 to my raspberry pi. Set it up using CUPS. It is able to print the test info from the cups web interface.
When I try to run the code, I get the following error:I'm assuming that lpr is some file that is created and contains the information that is sent to the printer. It must be failing to be created? If anyone has some insight into what I'm doing wrong, please let me know.Code:
FileNotFoundError: [Errno 2] No such file or directory: 'lpr'
Looking at the Zebra python code it does use the lpr command
Code:
p = subprocess.Popen( ['lpr', '-P{}'.format(self.queue), '-oraw'], stdin=subprocess.PIPEStatistics: Posted by rpdom — Wed Mar 26, 2025 9:18 am