Can't install HPLIP on Ubuntu

Asked by Marcos Abalde Cerqueira

I have downloaded HPLIP 3.23.12 on an Ubuntu 24.04 machine and when running the command sh hplip-3.23.12.run I encounter the following errors:
Uncompressing HPLIP 3.23.12 Self Extracting Archive 100%
/home/impresora/Escritorio/hplip-3.23.12/base/g.py:305: SyntaxWarning: invalid escape sequence '\|'
  spinner = "\|/-\|/-"
/home/impresora/Escritorio/hplip-3.23.12/base/g.py:355: SyntaxWarning: invalid escape sequence '\d'
  m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found
/home/impresora/Escritorio/hplip-3.23.12/base/logger.py:438: SyntaxWarning: invalid escape sequence '\<'
  elem_start = re.findall("(\<\W{0,1}\w+) ?", line)[0]
/home/impresora/Escritorio/hplip-3.23.12/base/logger.py:439: SyntaxWarning: invalid escape sequence '\]'
  elem_finished = re.findall("([?|\]\]]*\>)", line)[0]
/home/impresora/Escritorio/hplip-3.23.12/base/logger.py:441: SyntaxWarning: invalid escape sequence '\S'
  attrs = re.findall("(\S*?\=\".*?\")", line)
Traceback (most recent call last):
  File "/home/impresora/Escritorio/hplip-3.23.12/./install.py", line 38, in <module>
    from base.g import *
  File "/home/impresora/Escritorio/hplip-3.23.12/base/g.py", line 240, in <module>
    sys_conf = SysConfig()
               ^^^^^^^^^^^
  File "/home/impresora/Escritorio/hplip-3.23.12/base/g.py", line 185, in __init__
    ConfigBase.__init__(self, '/etc/hp/hplip.conf')
  File "/home/impresora/Escritorio/hplip-3.23.12/base/g.py", line 90, in __init__
    self.read()
  File "/home/impresora/Escritorio/hplip-3.23.12/base/g.py", line 131, in read
    self.conf.readfp(fp)
    ^^^^^^^^^^^^^^^^
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :
#1

Open terminal:
sudo apt install hplip

It is the same version of hplip as you have downloaded.

Revision history for this message
mir (midon) said (last edit ):
#2

I am sorry but your suggestion doesn't work, I have the same problem, hplip worked very good in ubuntu 22.04, but in this new one I encountered these same errors. What do we can? Thank You.
Mir

Revision history for this message
mir (midon) said :
#3

This work but without gui.
https://linux-packages.com/ubuntu-24-04/package/hplip
How can install gui?

Revision history for this message
Daniel Schiller (danschi) said :
#4

Did you already try "sudo apt install hplip-gui" (https://linux-packages.com/ubuntu-24-04/package/hplip-gui)?

Can you help with this problem?

Provide an answer of your own, or ask Marcos Abalde Cerqueira for more information if necessary.

To post a message you must log in.