![]() |
Python dist-packages problem? -- null distro/platform name - Printable Version +- Linux Lite Forums (https://www.linuxliteos.com/forums) +-- Forum: Software - Support (https://www.linuxliteos.com/forums/forumdisplay.php?fid=5) +--- Forum: Installing Software (https://www.linuxliteos.com/forums/forumdisplay.php?fid=18) +--- Thread: Python dist-packages problem? -- null distro/platform name (/showthread.php?tid=7636) |
Python dist-packages problem? -- null distro/platform name - HiTechHiTouch - 02-18-2021 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)" Code: + hp-plugin 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). |