02-18-2021, 06:01 AM
(This post was last modified: 10-12-2021, 05:30 PM by firenice03.)
In attempting to install my HP P1606dn printer, I learned that an additional piece of code beyond the HPLIP 3.20.11 provided materials is required. To install this support module, HP provides HPLIP-3.20.11-plugin.run, a python script. This script uses platform.dist()[0] to obtain the name of the distribution. The error message is "AttributeError: module 'platform' has no attribute 'dist'".
The function is in /usr/lib/python3/dist-packages (1.4.0), and "pip install distro" reports "Requirement already satisfied: distro in /usr/lib/python3/dist-packages (1.4.0)"
The HP helper hp-plugin fails to install for many (non LL) distributions because the packager did not pick up the Python distro package, which is now required for Python 3.8+ because of code removal in 3.8.
So... I went down the chain to see that LL indeed had a usable dist-packages. All appears well, i.e. the LL distribution is NOT missing the newly required dist-packages.
However, dist-packages claims to be HIGHLY system dependent, poking around in C libraries and other places to figure out what to report. See https://pypi.org/project/distro for background. Also https:docs.python.org/2/library/platform.html section 15.15.5
So may I politely ask if the LL packager needs to do something to have dist-packages report the distribution name? (I assume it would be Ubuntu, 20.04.x, Focal Fossa).
The function is in /usr/lib/python3/dist-packages (1.4.0), and "pip install distro" reports "Requirement already satisfied: distro in /usr/lib/python3/dist-packages (1.4.0)"
Code:
+ hp-plugin
HP Linux Imaging and Printing System (ver 3.20.11)
Plugin Download and Install Utility ver 2.1
qt5ct: using qt5ct plugin
Checking for network connection...
Downloading plugin from:
Traceback (most recent call last):
File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
os_name = platfrom.dist()[0]
AttributeError: module 'platfrom' has no attribute 'dist'
The HP helper hp-plugin fails to install for many (non LL) distributions because the packager did not pick up the Python distro package, which is now required for Python 3.8+ because of code removal in 3.8.
So... I went down the chain to see that LL indeed had a usable dist-packages. All appears well, i.e. the LL distribution is NOT missing the newly required dist-packages.
However, dist-packages claims to be HIGHLY system dependent, poking around in C libraries and other places to figure out what to report. See https://pypi.org/project/distro for background. Also https:docs.python.org/2/library/platform.html section 15.15.5
So may I politely ask if the LL packager needs to do something to have dist-packages report the distribution name? (I assume it would be Ubuntu, 20.04.x, Focal Fossa).