Bug 1368737 - hp-setup is missing dependencies
Summary: hp-setup is missing dependencies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 24
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Randy Barlow
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-20 19:05 UTC by Randy Barlow
Modified: 2018-10-27 23:14 UTC (History)
5 users (show)

Fixed In Version: hplip-3.16.7-2.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-26 10:21:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Randy Barlow 2016-08-20 19:05:59 UTC
Description of problem:
Hello! I just installed hplip to get the hp-setup utility. When I run hp-setup, it complains about missing dependencies and exits with code 1.


Version-Release number of selected component (if applicable):
hplip-3.16.7-1.fc24.x86_64


How reproducible:
Every time


Steps to Reproduce:
1. $ dnf install hplip
2. $ hp-setup


Actual results:
[rbarlow@ohm ~]$ hp-setup 

HP Linux Imaging and Printing System (ver. 3.16.7)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 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.

warning: GUI Modules PyQt4 and PyQt5 are not installed
error: hp-setup requires GUI support (try running with --qt3). Also, try using interactive (-i) mode.
[rbarlow@ohm ~]$ echo $?
1


Expected results:
The utility should have all the dependencies it needs to run and run successfully.

Comment 1 Randy Barlow 2016-08-20 19:10:33 UTC
I just noticed that I do in fact have the python-qt4 and python-qt5 packages installed, so something is wrong with hp-setup finding those packages.

[rbarlow@ohm ~]$ rpm -q python-qt5
python-qt5-5.6-4.fc24.x86_64
[rbarlow@ohm ~]$ rpm -q PyQt4
PyQt4-4.11.4-14.fc24.x86_64

Comment 2 Randy Barlow 2016-08-20 19:32:41 UTC
It later occurred to me to check the hp-setup script, and I noticed that it has #!/usr/bin/python3 at the top (nice!). And I didn't have python3-qt5 installed, so that was the problem. Please add python3-qt5 as a dependency of hp-setup to resolve this problem.

However, there still seem to be missing dependencies:

[rbarlow@ohm ~]$ hp-setup 

HP Linux Imaging and Printing System (ver. 3.16.7)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 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.

Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 313, in <module>
    ui = import_module(ui_package + ".setupdialog")
  File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'ui5'

Comment 3 Randy Barlow 2016-08-20 19:38:26 UTC
It seems that nothing in Fedora provides the ui5 Python package:

$ dnf provides /usr/lib/python3.5/site-packages/ui5/__init__.py
Last metadata expiration check: 2 days, 23:10:44 ago on Wed Aug 17 16:27:10 2016.
Error: No Matches found

Comment 4 Zdenek Dohnal 2016-08-22 07:36:41 UTC
Hello Randy,

thank you for contacting us. I think problem lies in usage 'hp-setup' without hplip-gui package installed (it is not installed by default, because package isn't mandatory for running hp-setup - you can use CLI interface by 'hp-setup -i'). Do you have this package installed? If not, would you mind installing it and tell me if it works?

Comment 5 Randy Barlow 2016-08-22 14:00:14 UTC
Hello Zdenek!

I did not have that gui installed, and after installing it I was able to use the hp-setup utility. Thanks for the tip!

Perhaps there is a way to help users to avoid this confusion in the future. Perhaps hp-setup could be patched to suggest that users install the gui package when it is not found instead of the tracebacks about ui5 and python3-qt5?

Comment 6 Zdenek Dohnal 2016-08-22 15:39:21 UTC
Yeah, we have similar patch in f25, I will build it for f24.

Comment 7 Fedora Update System 2016-08-22 16:04:59 UTC
hplip-3.16.7-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b41164b985

Comment 8 Randy Barlow 2016-08-22 20:32:32 UTC
Thanks so much Zdenek, I'll test it out for you!

Comment 9 Fedora Update System 2016-08-23 16:22:08 UTC
hplip-3.16.7-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b41164b985

Comment 10 Fedora Update System 2016-08-26 10:21:51 UTC
hplip-3.16.7-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Michal Ambroz 2018-10-27 23:14:19 UTC
Issue re-occured on Fedora 28 - without any visible hint to install hplip-gui.

$ hp-setup 

HP Linux Imaging and Printing System (ver. 3.18.6)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 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.

Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 313, in <module>
    ui = import_module(ui_package + ".setupdialog")
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'ui5'


Note You need to log in before you can comment on or make changes to this bug.