Unable to install on Ubuntu 20.04 -- missing dependency pyqt5

Asked by Larry Merkle on 2020-12-28

I am attempting to install HPLIP on my Ubuntu 20.04 system. Installation fails because the installer is unable to resolve the missing dependency on python-pyqt5 (see below).

larry@xphileprof-SYS-5039A-IL:~/Downloads$ sh hplip-3.20.11.run
Creating directory hplip-3.20.11
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.11 Self Extracting Archive...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

HP Linux Imaging and Printing System (ver. 3.20.11)
HPLIP Installer ver. 5.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Installer log saved in: hplip-install_Mon-28-Dec-2020_08:14:17.log

\
note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.

INSTALLATION MODE
-----------------
Automatic mode will install the full HPLIP solution with the most common options.
Custom mode allows you to choose installation options to fit specific requirements.

Please choose the installation mode (a=automatic*, c=custom, q=quit) :

INTRODUCTION
------------
This installer will install HPLIP version 3.20.11 on your computer.
Please close any running package management systems now (YaST, Adept, Synaptic, Up2date, etc).

DISTRO/OS CONFIRMATION
----------------------
Distro appears to be Ubuntu 20.04.

Is "Ubuntu 20.04" your correct distro/OS and version (y=yes*, n=no, q=quit) ?

Initializing. Please wait...

ENTER USER PASSWORD
-------------------
Please enter the sudoer (larry)'s password:

INSTALLATION NOTES
------------------
Enable the universe/multiverse repositories. Also be sure you are using the Ubuntu "Main" Repositories. See: https://help.ubuntu.com/community/Repositories/Ubuntu for more information. Disable the CD-ROM/DVD source if you do not have the Ubuntu installation media inserted in the drive.

Please read the installation notes. Press <enter> to continue or 'q' to quit:

SECURITY PACKAGES
-----------------
AppArmor is installed.
AppArmor protects the application from external intrusion attempts making the application secure

Would you like to have this installer install the hplip specific policy/profile (y=yes*, n=no, q=quit) ?

RUNNING PRE-INSTALL COMMANDS
----------------------------
OK

RUNNING HPLIP LIBS REMOVE COMMANDS
----------------------------------
sudo apt-get remove libhpmud0 libsane-hpaio
sudo apt-get remove libhpmud0 libsane-hpaio ( hp_libs_remove step 1)
OK

MISSING DEPENDENCIES
--------------------
Following dependencies are not installed. HPLIP will not work if all REQUIRED dependencies are not installed and some of the HPLIP features will not work if OPTIONAL dependencies are not installed.
Package-Name Component Required/Optional
pyqt5-dbus gui_qt5 OPTIONAL
pil scan OPTIONAL
reportlab fax OPTIONAL
pyqt5 gui_qt5 REQUIRED
python-notify gui_qt5 OPTIONAL
Do you want to install these missing dependencies (y=yes*, n=no, q=quit) ?

INSTALL MISSING REQUIRED DEPENDENCIES
-------------------------------------
note: Installation of dependencies requires an active internet connection.
warning: Missing REQUIRED dependency: pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))

INSTALL MISSING OPTIONAL DEPENDENCIES
-------------------------------------
note: Installation of dependencies requires an active internet connection.
warning: Missing OPTIONAL dependency for option 'gui_qt5': pyqt5-dbus (PyQt 5 DBus - DBus Support for PyQt5)
warning: Missing OPTIONAL dependency for option 'gui_qt5': python-notify (Python libnotify - Python bindings for the libnotify Desktop notifications)
warning: Missing OPTIONAL dependency for option 'fax': reportlab (Reportlab - PDF library for Python)
warning: Missing OPTIONAL dependency for option 'scan': pil (PIL - Python Imaging Library (required for commandline scanning with hp-scan))
warning: This installer cannot install 'pil' for your distro/OS and/or version.

CHECKING FOR NETWORK CONNECTION
-------------------------------
Network connection present.

RUNNING PRE-PACKAGE COMMANDS
----------------------------
sudo dpkg --configure -a (Pre-depend step 1)
sudo apt-get install --yes --force-yes -f (Pre-depend step 2)
sudo apt-get update (Pre-depend step 3)
OK

DEPENDENCY AND CONFLICT RESOLUTION
----------------------------------
Running 'sudo apt-get install --assume-yes gtk2-engines-pixbuf'
Please wait, this may take several minutes...
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Command failed. Re-try #1...
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Command failed. Re-try #2...
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
Would you like to retry installing the missing package(s) (y=yes*, n=no, q=quit) ? q
larry@xphileprof-SYS-5039A-IL:~/Downloads$

*****

Attempting to install the missing package manually also fails:

larry@xphileprof-SYS-5039A-IL:~/Downloads$ sudo apt install python-pyqt5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pyqt5
larry@xphileprof-SYS-5039A-IL:~/Downloads$

*****

The universe and multiverse repositories are enabled:

larry@xphileprof-SYS-5039A-IL:~/Downloads$ sudo add-apt-repository universe
[sudo] password for larry:
'universe' distribution component is already enabled for all sources.
larry@xphileprof-SYS-5039A-IL:~/Downloads$ sudo add-apt-repository multiverse
'multiverse' distribution component is already enabled for all sources.
larry@xphileprof-SYS-5039A-IL:~/Downloads$

*****

My default Python version is 2.7.18:

larry@xphileprof-SYS-5039A-IL:~/Downloads$ which python
/usr/bin/python
larry@xphileprof-SYS-5039A-IL:~/Downloads$ python --version
Python 2.7.18
larry@xphileprof-SYS-5039A-IL:~/Downloads$*****

Nevertheless, I followed the suggestions at https://answers.launchpad.net/hplip/+question/690781 *before* producing the output copied above (it had no effect).

larry@xphileprof-SYS-5039A-IL:~/Downloads$ sudo apt install python3-dbus.mainloop.pyqt5 python3-reportlab python3-notify2
[sudo] password for larry:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-reportlab is already the newest version (3.5.34-1ubuntu1).
python3-dbus.mainloop.pyqt5 is already the newest version (5.14.1+dfsg-3build1).
python3-notify2 is already the newest version (0.3-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
larry@xphileprof-SYS-5039A-IL:~/Downloads$ sudo apt install python3-pyqt5
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pyqt5 is already the newest version (5.14.1+dfsg-3build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
larry@xphileprof-SYS-5039A-IL:~/Downloads$

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Larry Merkle
Solved:
2020-12-29
Last query:
2020-12-29
Last reply:
Larry Merkle (xphileprof) said : #1

Well, shame on me for not checking this first, shame on HPLIP for not noting it on https://launchpad.net/hplip, and shame on HP for not noting it on

- https://support.hp.com/us-en/document/c01174360
- https://developers.hp.com/hp-linux-imaging-and-printing/ or
- https://developers.hp.com/hp-linux-imaging-and-printing/gethplip.

The last webpage mentioned *does* say "If you are not sure whether you need to download the HPLIP software, select "More Information" below." If only I had known I wasn't sure ...

larry@xphileprof-SYS-5039A-IL:~/Downloads$ sudo apt show hplip
Package: hplip
Version: 3.20.3+dfsg0-2
Priority: optional
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian Printing Team <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 531 kB
Depends: adduser, cups, hplip-data (= 3.20.3+dfsg0-2), libhpmud0 (= 3.20.3+dfsg0-2), libsane-hpaio (= 3.20.3+dfsg0-2), lsb-base, printer-driver-hpcups (= 3.20.3+dfsg0-2), python3-dbus, python3-gi, python3-pexpect, python3-pil, python3-reportlab, wget, python3:any, xz-utils, python3 (<< 3.9), python3 (>= 3.8~), libc6 (>= 2.14), libcups2 (>= 1.6.0), libdbus-1-3 (>= 1.9.14), libpython3.8 (>= 3.8.2), libsane (>= 1.0.24)
Recommends: avahi-daemon, policykit-1, printer-driver-postscript-hp, sane-utils
Suggests: hplip-doc, hplip-gui, python3-notify2, system-config-printer
Homepage: https://developers.hp.com/hp-linux-imaging-and-printing
Task: ubuntu-desktop-minimal, ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Download-Size: 204 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Description: HP Linux Printing and Imaging System (HPLIP)
 The HP Linux Printing and Imaging System provides full support for
 printing on most HP SFP (single function peripheral) inkjets and many
 LaserJets, and for scanning, sending faxes and for photo-card access on
 most HP MFP (multi-function peripheral) printers.
 .
 HPLIP is composed of:
  * System services to handle communications with the printers
  * HP CUPS backend driver (hp:) with bi-directional communication with
    HP printers (provides printer status feedback to CUPS and enhanced
    HPIJS functionality such as 4-side full-bleed printing support)
  * HP CUPS backend driver for sending faxes (hpfax:)
  * hpcups CUPS Raster driver to turn rasterized input from the CUPS
    filter chain into the printer's native format (PCL, LIDIL, ...).
    (hpcups is shipped in a separate package)
  * HPIJS Ghostscript IJS driver to rasterize output from PostScript(tm)
    files or from any other input format supported by Ghostscript, and
    also for PostScript(tm) to fax conversion support
    (HPIJS is shipped in a separate package)
  * Command line utilities to perform printer maintenance, such as
    ink-level monitoring or pen cleaning and calibration
  * GUI and command line utility to download data from the photo card
    interfaces in MFP devices
  * GUI and command line utilities to interface with the fax functions
  * A GUI toolbox to access all these functions in a friendly way
  * HPAIO SANE backend (hpaio) for flatbed and Automatic Document Feeder
    (ADF) scanning using MFP devices
 .
 USB and JetDirect (network) devices are supported.