Score:1

OKI scanner driver (okiscantool) cannot find pygtk in Ubuntu 21.10

in flag

I had the OKI scanner driver install in Ubuntu 18.04 before I upgraded to 21.10. Now when I start okiscantool I get the message ImportError: No module named pygtk.

I see python3 installed as well as python2.

~$ dpkg -l '*python*' | grep ii
ii  libpython2-stdlib:amd64          2.7.18-3                        amd64        interactive high-level object-oriented language (Python2)
ii  libpython2.7-minimal:amd64       2.7.18-8build1                  amd64        Minimal subset of the Python language (version 2.7)
ii  libpython2.7-stdlib:amd64        2.7.18-8build1                  amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-stdlib:amd64          3.9.4-1build1                   amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.9:amd64               3.9.7-2build1                   amd64        Shared Python runtime library (version 3.9)
ii  libpython3.9-minimal:amd64       3.9.7-2build1                   amd64        Minimal subset of the Python language (version 3.9)
ii  libpython3.9-stdlib:amd64        3.9.7-2build1                   amd64        Interactive high-level object-oriented language (standard library, version 3.9)
ii  python-apt-common                2.2.1                           all          Python interface to libapt-pkg (locales)
ii  python-is-python2                2.7.18-9                        all          symlinks /usr/bin/python to the DEPRECATED python2
ii  python-matplotlib-data           3.3.4-1                         all          Python based plotting system (data package)
ii  python2                          2.7.18-3                        amd64        interactive high-level object-oriented language (Python2 version)
ii  python2-minimal                  2.7.18-3                        amd64        minimal subset of the Python2 language
ii  python2.7                        2.7.18-8build1                  amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                2.7.18-8build1                  amd64        Minimal subset of the Python language (version 2.7)
ii  python3                          3.9.4-1build1                   amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apport                   2.20.11-0ubuntu71               all          Python 3 library for Apport crash report handling
ii  python3-apt                      2.2.1                           amd64        Python 3 interface to libapt-pkg
ii  python3-aptdaemon                1.1.1+bzr982-0ubuntu36          all          Python 3 module for the server and client of aptdaemon
ii  python3-aptdaemon.gtk3widgets    1.1.1+bzr982-0ubuntu36          all          Python 3 GTK+ 3 widgets to run an aptdaemon client
ii  python3-bcrypt                   3.1.7-4                         amd64        password hashing library for Python 3
ii  python3-blinker                  1.4+dfsg1-0.3ubuntu2            all          fast, simple object-to-object and broadcast signaling library
ii  python3-brlapi:amd64             6.3+dfsg-1ubuntu2               amd64        Braille display access via BRLTTY - Python3 bindings
ii  python3-cairo:amd64              1.16.2-4build2                  amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-certifi                  2020.6.20-1                     all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-cffi-backend:amd64       1.14.6-1build1                  amd64        Foreign Function Interface for Python 3 calling C code - runtime
ii  python3-chardet                  4.0.0-1                         all          universal character encoding detector for Python3
ii  python3-click                    7.1.2-1                         all          Wrapper around optparse for command line utilities - Python 3.x
ii  python3-colorama                 0.4.4-1                         all          Cross-platform colored terminal text in Python - Python 3.x
ii  python3-commandnotfound          21.10.0                         all          Python 3 bindings for command-not-found.
ii  python3-cryptography             3.3.2-1                         amd64        Python library exposing cryptographic recipes and primitives (Python 3)
ii  python3-cups:amd64               2.0.1-4build1                   amd64        Python3 bindings for CUPS
ii  python3-cupshelpers              1.5.15-0ubuntu2                 all          Python utility modules around the CUPS printing system
ii  python3-cycler                   0.10.0-3                        all          composable kwarg iterator (Python 3)
ii  python3-dateutil                 2.8.1-6                         all          powerful extensions to the standard Python 3 datetime module
ii  python3-dbus                     1.2.16-5                        amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-debconf                  1.5.77                          all          interact with debconf from Python 3
ii  python3-debian                   0.1.39ubuntu1                   all          Python 3 modules to work with Debian-related data formats
ii  python3-defer                    1.0.6-2.1                       all          Small framework for asynchronous programming (Python 3)
ii  python3-distro                   1.5.0-1                         all          Linux OS platform information API
ii  python3-distro-info              1.0                             all          information about distributions' releases (Python 3 module)
ii  python3-distupgrade              1:21.10.8                       all          manage release upgrades
ii  python3-fasteners                0.14.1-2                        all          provides useful locks - Python 3.x
ii  python3-future                   0.18.2-5                        all          Clean single-source support for Python 3 and 2 - Python 3.x
ii  python3-gdbm:amd64               3.9.7-1                         amd64        GNU dbm database support for Python 3.x
ii  python3-ges-1.0                  1.18.5-1                        all          Python bindings for the GES library
ii  python3-gi                       3.40.1-1build1                  amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                 3.40.1-1build1                  amd64        Python 3 Cairo bindings for the GObject library
ii  python3-gpg                      1.14.0-1ubuntu4                 amd64        Python interface to the GPGME GnuPG encryption library (Python 3)
ii  python3-gst-1.0                  1.18.5-1                        amd64        GStreamer GObject Introspection overrides for Python (Python 3)
ii  python3-httplib2                 0.18.1-3ubuntu1                 all          comprehensive HTTP client library written for Python3
ii  python3-ibus-1.0                 1.5.25-2build1                  all          Intelligent Input Bus - introspection overrides for Python (Python 3)
ii  python3-idna                     2.10-1                          all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-importlib-metadata       4.0.1-1                         all          library to access the metadata for a Python package - Python 3.x
ii  python3-jeepney                  0.7.1-1                         all          pure Python D-Bus interface
ii  python3-jwt                      1.7.1-2ubuntu2                  all          Python 3 implementation of JSON Web Token
ii  python3-keyring                  23.0.1-1                        all          store and access your passwords safely
ii  python3-kiwisolver               1.3.1-1build1                   amd64        fast implementation of the Cassowary constraint solver - Python 3.X
ii  python3-launchpadlib             1.10.13-1                       all          Launchpad web services client library (Python 3)
ii  python3-lazr.restfulclient       0.14.2-2build1                  all          client for lazr.restful-based web services (Python 3)
ii  python3-lazr.uri                 1.0.5-1                         all          library for parsing, manipulating, and generating URIs
ii  python3-ldb                      2:2.2.3-0ubuntu0.21.10.2        amd64        Python 3 bindings for LDB
ii  python3-lib2to3                  3.9.7-1                         all          Interactive high-level object-oriented language (lib2to3)
ii  python3-lockfile                 1:0.12.2-2.2                    all          file locking library for Python — Python 3 library
ii  python3-louis                    3.18.0-1                        all          Python bindings for liblouis
ii  python3-macaroonbakery           1.3.1-1                         all          Higher-level macaroon operations for Python 3
ii  python3-mako                     1.1.3+ds1-2                     all          fast and lightweight templating for the Python 3 platform
ii  python3-markupsafe               1.1.1-1build2                   amd64        HTML/XHTML/XML string library for Python 3
ii  python3-matplotlib               3.3.4-1                         amd64        Python based plotting system in a style similar to Matlab (Python 3)
ii  python3-minimal                  3.9.4-1build1                   amd64        minimal subset of the Python language (default python3 version)
ii  python3-monotonic                1.5-3                           all          implementation of time.monotonic() - Python 3.x
ii  python3-more-itertools           4.2.0-3                         all          library with routines for operating on iterables, beyond itertools (Python 3)
ii  python3-nacl                     1.4.0-1build1                   amd64        Python bindings to libsodium (Python 3)
ii  python3-netifaces                0.10.9-0.2                      amd64        portable network interface information - Python 3.x
ii  python3-numpy                    1:1.19.5-1ubuntu2               amd64        Fast array facility to the Python 3 language
ii  python3-oauthlib                 3.1.0-2                         all          generic, spec-compliant implementation of OAuth for Python3
ii  python3-olefile                  0.46-3                          all          Python module to read/write MS OLE2 files
ii  python3-paramiko                 2.7.2-1ubuntu1                  all          Make ssh v2 connections (Python 3)
ii  python3-pexpect                  4.8.0-2ubuntu1                  all          Python 3 module for automating interactive applications
ii  python3-pil:amd64                8.1.2+dfsg-0.3ubuntu0.1         amd64        Python Imaging Library (Python3)
ii  python3-pkg-resources            52.0.0-4                        all          Package Discovery and Resource Access using pkg_resources
ii  python3-problem-report           2.20.11-0ubuntu71               all          Python 3 library to handle problem reports
ii  python3-protobuf                 3.12.4-1ubuntu3                 amd64        Python 3 bindings for protocol buffers
ii  python3-ptyprocess               0.7.0-1                         all          Run a subprocess in a pseudo terminal from Python 3
ii  python3-pyatspi                  2.38.1-1                        all          Assistive Technology Service Provider Interface - Python3 bindings
ii  python3-pymacaroons              0.13.0-4                        all          Macaroon library for Python 3
ii  python3-pyparsing                2.4.7-1                         all          alternative to creating and executing simple grammars - Python 3.x
ii  python3-renderpm:amd64           3.5.66-1                        amd64        python low level render interface
ii  python3-reportlab                3.5.66-1                        all          ReportLab library to create PDF documents using Python3
ii  python3-reportlab-accel:amd64    3.5.66-1                        amd64        C coded extension accelerator for the ReportLab Toolkit
ii  python3-requests                 2.25.1+dfsg-2                   all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-rfc3339                  1.1-2                           all          parser and generator of RFC 3339-compliant timestamps (Python 3)
ii  python3-samba                    2:4.13.14+dfsg-0ubuntu0.21.10.4 amd64        Python 3 bindings for Samba
ii  python3-secretstorage            3.3.1-1                         all          Python module for storing secrets - Python 3.x version
ii  python3-simplejson               3.17.2-1                        amd64        simple, fast, extensible JSON encoder/decoder for Python 3.x
ii  python3-six                      1.16.0-2                        all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-software-properties      0.99.13.1                       all          manage the repositories that you install software from
ii  python3-speechd                  0.10.2-2build1                  all          Python interface to Speech Dispatcher
ii  python3-sss                      2.4.1-2ubuntu4                  amd64        Python3 module for the System Security Services Daemon
ii  python3-systemd                  234-3build4                     amd64        Python 3 bindings for systemd
ii  python3-talloc:amd64             2.3.1-2ubuntu2                  amd64        hierarchical pool based memory allocator - Python3 bindings
ii  python3-tdb                      1.4.3-1build1                   amd64        Python3 bindings for TDB
ii  python3-tk:amd64                 3.9.7-1                         amd64        Tkinter - Writing Tk applications with Python 3.x
ii  python3-tz                       2021.1-1                        all          Python3 version of the Olson timezone database
ii  python3-uno                      1:7.2.3-0ubuntu0.21.10.1        amd64        Python-UNO bridge
ii  python3-update-manager           1:21.10.5                       all          python 3.x module for update-manager
ii  python3-urllib3                  1.26.5-1~exp1                   all          HTTP library with thread-safe connection pooling for Python3
ii  python3-wadllib                  1.3.5-1                         all          Python 3 library for navigating WADL files
ii  python3-xdg                      0.27-2                          all          Python 3 library to access freedesktop.org standards
ii  python3-xkit                     0.5.0ubuntu4                    all          library for the manipulation of xorg.conf files (Python 3)
ii  python3-yaml                     5.3.1-5                         amd64        YAML parser and emitter for Python3
ii  python3-zipp                     1.0.0-3                         all          pathlib-compatible Zipfile object wrapper - Python 3.x
ii  python3.9                        3.9.7-2build1                   amd64        Interactive high-level object-oriented language (version 3.9)
ii  python3.9-minimal                3.9.7-2build1                   amd64        Minimal subset of the Python language (version 3.9)

I'm not a python hacker, so can someone please tell me how to get pygtk to be activated or registered again?

Johan Palych avatar
us flag
Are you using this driver(okimfpsdrv_1.7-0_amd64_231225.deb)? Scanner drivers OKI multifunctional printers https://www.oki.com/ru/printing/download/okimfpsdrv_1.7-0_amd64_231225.deb
in flag
Yes, @JohanPalych, those are the drivers I'm using.
Score:1
zw flag

You still can install python-gtk2 by manual download using commands below:

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb

sudo apt-get install ./python-cairo_1.16.2-2ubuntu2_amd64.deb ./python-gobject-2_2.28.6-14ubuntu1_amd64.deb ./python-gtk2_2.24.0-5.1ubuntu2_amd64.deb

and then retry launching okiscantool.

in flag
I installed the packages you listed and `okiscantool` now works again!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.