Missing dependency to hplip

If you have any suggestions or ideas about improving Salix, here's the place to post them.
Post Reply
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Missing dependency to hplip

Post by Papasot »

The package hplip-nogui and hplip both need python-distro to work properly with many HP LaserJet printers. This is because their driver has to be downloaded and the corresponding tool, namely hp-config, will crash without python-distro. Although this seems to affect mostly LaserJet printers at the moment, HP stated that this is/will be the case for InkJet printers as well (see second paragraph in this webpage for details).
Therefore I believe python-distro should be a dependency for hplip-nogui and hplip.

Note that Salix has the package hplip-plugins which provides the required firmware for a few printers, but that didn't work in my case, so I had to use hp-config to download the driver from HP.
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Missing dependency to hplip

Post by gapan »

I only have an old HP inkjet printer at home and it works without python-distro. Anyway, I'll take your word for it and add it to the dependency list. Thanks!
Image
Image
User avatar
Papasot
Donor
Posts: 247
Joined: 3. May 2015, 18:37
Location: Patras, Greece

Re: Missing dependency to hplip

Post by Papasot »

gapan wrote: 21. May 2023, 09:18 I only have an old HP inkjet printer at home and it works without python-distro.
It works because it doesn't need a proprietary driver. My printer does - and it's just a budget laserjet several years old. Normally you would just run hp-config to set up your printer but, whenever a proprietary driver is needed, you have to run hp-plugin first. In fact running hp-config directs you to hp-plugin in this case. Now, hp-plugin downloads the appropriate driver for your printer but, to do that, it needs to know what your operating system is. Since all those tools are written in python, it uses python-distro for this.
So if your printer doesn't require a proprietary driver you don't have to run hp-plugin, therefore you don't need python-distro. You can verify all the above by just running hp-plugin in a terminal. If python-distro is not installed you get this:

Code: Select all

Checking for network connection...
Downloading plug-in from: 
Downloading plug-in: [\                                   ] 0%     Traceback (most recent call last):
  File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

During handling of the above exception, another exception occurred:

...... (traceback info here ......

ModuleNotFoundError: No module named 'distro'
A pleasant detail in this forum: several people pick a picture of their pet as their avatar. Who am I to do otherwise? ;-)
Post Reply