How do I scan an image with hp-scan?

I have always found it difficult, but I use it so rarely that I have to re-learn it.
This time, the blasted thing is demanding a PIL (Python Imaging Library) and
HP’s web site gives no hint about where to find such a thing. And YAST isn’t
helpful either. All of my Googling gets me to statements like, “It’s really easy”
but neither hp-scan nor scanimage is able to do anything. Oh, I did find some
PILy thing, but it required “direct install” and Googling that does not yield
instructions on how to do a direct install. Clicking the link just gets a screen
full of XML that’s hard for my eyeballs to parse.

SO, I’ve tried a lot of things and I’m here now looking for a suggestion.

My scan/fax/printer is an HP 1217mfp

Run

hp-doctor

and report back.

 **error: hp-scan requires the Python Imaging Library (PIL). Exiting.**
**note: Manually install the PIL package. More information is available at http://h**plipopensource.com/node/369

I think that that ought to be pretty clear, but still:

**HP Linux Imaging and Printing System (ver. 3.17.9)**
**Self Diagnse Utility and Healing Utility ver. 1.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.


**HP Linux Imaging and Printing System (ver. 3.17.9)**
**Self Diagnse Utility and Healing Utility ver. 1.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.

  

**Checking for Deprecated items....**
**error: This distro (i.e unknown  ) is either deprecated or not yet supported.**
**The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):**


**Checking for HPLIP updates....**

**HP Linux Imaging and Printing System (ver. 3.17.9)**
**HPLIP upgrade latest version ver. 1.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.

**error: HPLIP upgrade is disabled by openSUSE for security reasons, see https://bugzilla.novell.com/show_bug.cgi?id=853405 - if you like to upgrade HPLIP, use an openSUSE software package manager like YaST or zypper.**

Done.
**error: Failed to upgrade latest HPLIP. Is hp-upgrade already running (i.e. foreground or background)?**


**Checking for Dependencies....**
**warning: 0- version is not supported. Using 0-0 versions dependencies to verify and install...**

---------------
| SYSTEM INFO |
---------------

 Kernel: 4.12.14-lp150.12.48-default #1 SMP Tue Feb 12 14:01:48 UTC 2019 (268f014) GNU/Linux
 Host: bach
 Proc: 4.12.14-lp150.12.48-default #1 SMP Tue Feb 12 14:01:48 UTC 2019 (268f014) GNU/Linux
 Distribution: 0  
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.17.9
HPLIP-Home: /usr/share/hplip
**warning: HPLIP-Installation: Auto installation is not supported for 0 distro   version ** 

**Current contents of '/etc/hp/hplip.conf' file:**
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.17.9

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/cups/model/manufacturer-PPDs/hplip
ppdbase=/usr/share/cups/model/manufacturer-PPDs
doc=/usr/share/doc/packages/hplip
html==/usr/share/doc/packages/hplip
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/lib/cups/driver
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=no
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=no
cups-ppd-install=yes
internal-tag=3.17.9
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no


**Current contents of '/var/lib/hp/hplip.state' file:**
[plugin]
installed = 1
eula = 1
version = 3.17.9



**Current contents of '~/.hplip/hplip.conf' file:**
[last_used]
device_uri = hpaio:/net/HP_LaserJet_Professional_M1217nfw_MFP?ip=172.16.16.103

[installation]
date_time = 04/06/19 16:44:37
version = 3.17.9


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 cups                 CUPS - Common Unix Printing System                           REQUIRED        1.1             2.2.7           OK         'CUPS Scheduler is running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.26            OK         -
** error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'**
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
** error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.2          MISSING    'DBUS may not be installed or not running'**
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.114           OK         -
 network              network -wget                                                OPTIONAL        -               1.19.5          OK         -
** error: avahi-utils   avahi-utils                                                  OPTIONAL        -               -               MISSING    'avahi-utils needs to be installed'**

------------------------
| General Dependencies |
------------------------
**error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'**
** error: cups-devel    CUPS devel- Common Unix Printing System development files    REQUIRED        -               2.2.7           MISSING    'cups-devel needs to be installed'**
** error: cups-image    CUPS image - CUPS image development files                    REQUIRED        -               2.2.7           MISSING    'cups-image needs to be installed'**
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.26'         OK         -
** error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'**
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
** error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'**
** error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           5.7.3           MISSING    'libnetsnmp-devel needs to be installed'**
 libcrypto            libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.0           OK         -
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.6.5           OK         -
** error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'**
** error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4                         OPTIONAL        4.0             -               MISSING    'python3-pyqt4-dbus needs to be installed'**
** error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x)         REQUIRED        4.0             -               MISSING    'python3-pyqt4 needs to be installed'**
 python3-dbus         Python DBus - Python bindings for DBus                       REQUIRED        0.80.0          1.2.4           OK         -
 python3-xml          Python XML libraries                                         REQUIRED        -               2.2.5           OK         -
** error: python3-devel Python devel - Python development files                      REQUIRED        2.2             3.6.5           MISSING    'python3-devel needs to be installed'**
** error: python3-pil   PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL        -               -               MISSING    'python3-pil needs to be installed'**
** error: python3-reportlab Reportlab - PDF library for Python                           OPTIONAL        2.0             -               MISSING    'python3-reportlab needs to be installed'**

--------------
| COMPILEDEP |
--------------
 libtool              libtool - Library building support services                  REQUIRED        -               2.4.6           OK         -
 gcc                  gcc - GNU Project C and C++ Compiler                         REQUIRED        -               7.3.1           OK         -
 make                 make - GNU make utility to maintain groups of programs       REQUIRED        3.0             4.2.1           OK         -

---------------------
| Python Extentions |
---------------------
cupsext              CUPS-Extension                                               REQUIRED        -               3.17.9          OK         -
 hpmudext             IO-Extension                                                 REQUIRED        -               3.17.9          OK         -

----------------------
| Scan Configuration |
----------------------
hpaio                HPLIP-SANE-Backend                                           REQUIRED        -               3.17.9          OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension                                          REQUIRED        -               3.17.9          OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------
device `hpaio:/usb/HP_LaserJet_Professional_M1217nfw_MFP?serial=000000000T210B25PR1a' is a Hewlett-Packard HP_LaserJet_Professional_M1217nfw_MFP all-in-one
device `hpaio:/net/HP_LaserJet_Professional_M1217nfw_MFP?ip=172.16.16.103' is a Hewlett-Packard HP_LaserJet_Professional_M1217nfw_MFP all-in-one

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI                                                                 Model
-------------------------------------------------------------------------  -----------------------------------------------
  hp:/usb/HP_LaserJet_Professional_M1217nfw_MFP?serial=000000000T210B25PR1a  HP LaserJet Professional M1217nfw MFP           

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------
 
**HP-LaserJet-Professional-M1217nfw-MFP**
**-------------------------------------**
Type: Printer
Device URI: hp:/usb/HP_LaserJet_Professional_M1217nfw_MFP?serial=000000000T210B25PR1a
PPD: /etc/cups/ppd/HP-LaserJet-Professional-M1217nfw-MFP.ppd
PPD Description: HP LaserJet Professional m1217nfw MFP, hpcups 3.17.9, requires proprietary plugin
Printer status: printer HP-LaserJet-Professional-M1217nfw-MFP is idle.  enabled since Sat 06 Apr 2019 03:06:44 PM PDT
Required plug-in status: Installed
Communication status: Good

**HP-LaserJet-Professional-M1217nfw-MFP-Fax-3**
**-------------------------------------------**
Type: Fax
Device URI: hpfax:/usb/HP_LaserJet_Professional_M1217nfw_MFP?serial=000000000T210B25PR1a
PPD: /etc/cups/ppd/HP-LaserJet-Professional-M1217nfw-MFP-Fax-3.ppd
PPD Description: HP Fax3 hpcups
Printer status: printer HP-LaserJet-Professional-M1217nfw-MFP-Fax-3 is idle.  enabled since Wed 16 Jan 2019 09:51:13 PM PST
Required plug-in status: Installed
Communication status: Good

--------------
| PERMISSION |
--------------
USB             HP-LaserJet-Professional-M1217nfw-MFP Required        -        -        OK       Node:'/dev/bus/usb/002/006' Perm:'  root  lp rw- rw- rw- rw- r--'


**Checking Permissions....**


**Checking for Configured Queues....**

Queue(s) configured correctly using HPLIP.


**Checking for HP Properitery Plugin's....**
Plugin's already installed

OK, so you seem to have hplip installed. If the printer part works OK ( hplip ) then just go YaST > Hardware > Scanner and accept the hpaio driver for your scanner. Next, try s kanlite ( better than the HP utility IMO ) and it should find it

No official python-imaging package available for Leap 15, so as Knurpht suggests, try using another scanning application (eg simple-scan is my preferred app).

Other than that, it should work… the scanner output suggests that the hpaio backend is already defined in /etc/sane.d/dll.conf and the scanner device is discovered, so no further action should be required…

----------------------
| Scan Configuration |
----------------------
hpaio                HPLIP-SANE-Backend                                           REQUIRED        -               3.17.9          OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension                                          REQUIRED        -               3.17.9          OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------
device `hpaio:/usb/HP_LaserJet_Professional_M1217nfw_MFP?serial=000000000T210B25PR1a' is a Hewlett-Packard HP_LaserJet_Professional_M1217nfw_MFP all-in-one
device `hpaio:/net/HP_LaserJet_Professional_M1217nfw_MFP?ip=172.16.16.103' is a Hewlett-Packard HP_LaserJet_Professional_M1217nfw_MFP all-in-one

My scan/fax/printer is an HP 1217mfp

No, it is HP LaserJet Pro M1217nfw.

HPLIP works with openSUSE Leap 15.0 since HPLIP 3.19.1.
You have HPLIP 3.17.9 for a Leap 42.3.
https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

Do this:

  1. Uninstall HPLIP 3.17.9
  2. Install HPLIP 3.19.1 or newer (3.19.3 is accessible).

open suse 15: Need to install lsb-release package before installing HPLIP for the detection of distribution.
command: su -c “zypper install lsb-release”

Installer Walkthrough: HP Developers Portal | Installer Walkthrough

RTFM!