After upgrade from 19.10 to 20.04 I've autoremoved a lot of deprecated packages. During hplip upgrade I've confirmed using maintainer's version of configuration files. But after Ubuntu restarting, hp 1020 printer stopped printing. Hplip toolbox hanged each time I was refreshing its window. So I've purged and uninstalled hplip completely.
Installing using this guide installs hplip 3.20.3 version which have been installed earlier.
So I've downloaded 3.20.5 version from here for Ubuntu, chmoded it with x
permission and run it: ./hplip-3.20.5.run
.
It asked if I want to install missing dependencies:
Package-Name Component Required/Optional
pyqt5-dbus gui_qt5 OPTIONAL
reportlab fax OPTIONAL
pyqt5 gui_qt5 REQUIRED
python-notify gui_qt5 OPTIONAL
I said y
, but, for python-pyqt5
package I've got:
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
For python-dbus.mainloop.pyqt5
package:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-dbus.mainloop.pyqt5'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
For python-notify
package:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-notify'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
For python-reportlab
:
error: Command failed. Re-try #3...
Running 'sudo apt-get install --assume-yes python-reportlab'
Please wait, this may take several minutes...
error: Package install command failed with error code 100
I've skipped these packages installation because it was impossible to install them. At the end, I've got the next errors:
warning: Some HPLIP functionality might not function due to missing package(s).
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
RUNNING POST-PACKAGE COMMANDS
-----------------------------
OK
RE-CHECKING DEPENDENCIES
------------------------
error: A required dependency 'pyqt5 (PyQt 5- Qt interface for Python (for Qt version 4.x))' is still missing.
error: Installation cannot continue without this dependency.
error: Please manually install this dependency and re-run this installer.
I've also downloaded hplip-3.20.5-plugin.run
from here
$ bash hplip-3.20.5-plugin.run
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.5 Plugin Self Extracting Archive..............................................................
Error setting home directory: /etc/hp/hplip.conf not found. Is HPLIP installed?
Universe/Multiverse repositories are enabled, but:
$ apt-cache search python-pyqt5
python-pyqt5.qwt-doc - Python Qwt6 technical widget library, documentation and examples
$ apt-cache search python-reportlab
python-reportlab-doc - Documentation for the ReportLab Python library (PDF format)
$ apt-cache search python-dbus.mainloop.pyqt5
$ apt-cache search python-notify
python3-notify2 - desktop notifications API for Python 3
Packages python3-pyqt5
, python3-reportlab
, python3-notify2
, python3-dbus.mainloop.pyqt5
are installed and are already the newest version
s.
I could also see, for example, python-pyqt5
package is available in 19.10 repository, but this package requires qtbase-abi-5-12-4
package which does not exist there in eoan's repository. 18.04's python-pyqt5
package requires different qtbase-abi package, which is not present in bionic's repository.
Does it mean, phlip-3.20.5 is not compatible with 20.04 or maybe there some additional repository exists which contains these four packages and theirs dependencies?
Update:
Installed
hplip
,hplip-data
,hplip-gui
packages.Launched hplip-gui from launcher
Received the log in
journalctl -f
:Jun 07 23:14:13 ubuntu hplip.desktop[17823]: error: Unable to locate models.dat file Jun 07 23:14:13 ubuntu /hp-toolbox[17823]: [17823]: error: Unable to locate models.dat file Jun 07 23:14:13 ubuntu hplip.desktop[17823]: HP Linux Imaging and Printing System (ver. 0.0.0) Jun 07 23:14:13 ubuntu hplip.desktop[17823]: HP Device Manager ver. 15.0 Jun 07 23:14:13 ubuntu hplip.desktop[17823]: Copyright (c) 2001-18 HP Development Company, LP Jun 07 23:14:13 ubuntu hplip.desktop[17823]: This software comes with ABSOLUTELY NO WARRANTY. Jun 07 23:14:13 ubuntu hplip.desktop[17823]: This is free software, and you are welcome to distribute it Jun 07 23:14:13 ubuntu hplip.desktop[17823]: under certain conditions. See COPYING file for more details. Jun 07 23:14:13 ubuntu hplip.desktop[17823]: Traceback (most recent call last): Jun 07 23:14:13 ubuntu hplip.desktop[17823]: File "/usr/bin/hp-toolbox", line 269, in <module> Jun 07 23:14:13 ubuntu hplip.desktop[17823]: QApplication, ui_package = utils.import_dialog(ui_toolkit) Jun 07 23:14:13 ubuntu hplip.desktop[17823]: TypeError: cannot unpack non-iterable NoneType object
hplip-gui
have not been started: nothing appeared on the desktop.
Newer hplip-3.20.6 also does not support Ubuntu 20.04.
In fact there is some troubles using hplip-3.20.6 on Ubuntu 20.04. The installation complains about pyqt5. My workaround is to install hplib-3.20.6 with the custom option (instead of automatic). You can install hplib without qt support (without: Graphical User Interfaces (Qt5)). In a terminal please run:
Now you can select the custom installation and disable qt5:
You get:
I hope this comment will be usefull, Regards.
There is a solution, it took a while. I have just compiled hplip 3.20.9 with Qt5. And used below discussion hint to solve python-PyQt5 missing dependency: https://answers.launchpad.net/hplip/+question/691141 Seems now printers start working with Ubuntu 20.04.
Try installing pyqt5 with pip:
or if your version of hplip requires python3:
Still an issue even with
<=hplip-3.21.10
.It tries to install
python2
packages, even though your 20.04 Ubuntu haspython3
as the default.To fix install this helper package:
It will pretend to the
hplip
installer to usepython3
instead ofpython2
.To summarize a solution previously alluded to (from Bartosz), what worked for me was to basically change the
python
symlink in/usr/bin
to point to Python 3 instead of Python 2, as described in one of the answers at https://answers.launchpad.net/hplip/+question/691141.I've been experienced this issue and also very struggle to find the solution because the problem seems I haven't installed
pyqt5
but it's already installed (using python3) borrowed from this gistFinally, I found a website describing HPLIP problem on ubuntu exactly as I had at here https://ubuntuhandbook.org/index.php/2021/07/install-latest-hplip-ubuntu-20-04-fix/
The problem is because by default HPLIP installer using python at
/usr/bin/python
and that refers topython2.7
which is unrelated with the installedpyqt5
at mypython3
So based on that site, I choose to use
update-alternatives
to switch python version to python3 when the installer using/usr/bin/python
the first command is to add python2 at option number 1, and the second one is to add python3 at option number 2.
Here's the screenshot of when I switch to python3 and python2, before starting the installation again using python3 as the default one
It seems Ubuntu 20.04 is not supported by hplip 3.20.5 and below hplip releases. At least, Ubuntu 20.04 has not been mentioned on hp's Developer Portal | Release Notes page. The last mentioned Ubuntu version is 19.10 at the time.
So the optimal solution in my case is to wait for newer hplip release and use 18.04 VM on VirtualBox with USB 1.1 passthrough enabled for my hp 1020 printer until newer hplip released.
I don't know how, but maybe some update for 3.20.3 has resolved the issue with printing on 20.04
After connecting printer dialogue window appeared and said that plugin is required for it and proposed a few options. I've left the default and installed proposed plugin. After the installation I was able to print using HP LJ 1020 from Ubuntu 20.04
It works in spite of
hp-check
outputs:1st and 3rd packages are installed, so they are incompatible, 2nd and 4th packages are not available from official Ubuntu repositories. It could impact some functionality. But I'm glad it prints at least.
As none of the solutions provided up to 2021-02-15 solved this issue for my specific case (i.e. 64-bit XUbuntu 20.04.3 LTS with kernel 5.13.0-28-generic + wireless HP Deskjet Ink Advantage 2546 a.k.a. "Deskjet 2540 series" all-in-one printer), I ended up running the following shell terminal commands, which then solved the issue for me:
Purge the current HPLIP installation:
Install a DEB package that makes any application-level reference to python point to the system-default (i.e. *Ubuntu 20.04's default) python 3 installation:
Install the HPLIP packages that ship with *Ubuntu (i.e. Ubuntu, KUbuntu, XUbuntu...) 20.04:
Access the current user's Downloads folder:
Download HPLIP version 3.21.12 (released 2021-12-16) as a
.run
(i.e. shell script) installation file and store it in such user's Downloads folder:Make such downloaded script executable:
Run the installation script:
Durig the installation procedure, press Enter (return) in order to apply all default (
*
) options. If you are asked if you wish to remove (uninstall) the current HPLIP install and then install the HPLIP from the script, select such option (i
) instead of the quit option.Confirm that you want to download and install the HPLIP plugin (or
re-plug in
if the plugin is already installed). Be patient: it takes a while to download and install the plugin. You may think that the plugin installer's window is static because nothing is happening, but looking at the terminal window it's noticeable that the installer is contacting the web server, downloading and then installing the plugin.Reboot / restart the computer (you may ether press r and confirm once the installer asks if you wish to restart, or you may alternatively finish the installation, close all windows and only then reboot, manually).
After you turn your HP printer on, if the plugin at the panel does nothing after you click on it and then click on HP Device Manager, click on the applications menu, type hp device manager and select it so you can add and then configure your HP printer. You may also run HP Device Manager from the terminal by issuing this command: