You are not logged in.

#1 2010-11-02 23:41:13

doscervezas
Member
Registered: 2010-11-02
Posts: 6

HPLIP: "Syntax error: invalid syntax" installing HP LaserJet 1018

I'm trying to install my HP LaserJet 1018 on my new laptop with fresh arch installation. I have installed Cups and hplip, and now run hp-setup to install the proprietary plugin from HP that will load the firmware to the printer. However, I get an error running hp-setup and so the plugin cannot be installed.

* my printer is plugged in and turned on. In the system log, I can see something is recognized
* I run "hp-setup -i" as root
* Specify that the printer is installed on USB, then proceed to download the plugin. This succeeds
* Then it tries to install the plugin, and that is where it fails, with this message:

----------------------
| INSTALLING PLUG-IN |
----------------------

Verifying archive integrity... All good.
Uncompressing HPLIP 3.10.9 Plugin Self Extracting Archive.........................................
  File "./plugin_install.py", line 78
    except ImportError, e:
                      ^
SyntaxError: invalid syntax
error: Python gobject/dbus may be not installed

(I don't really know how to do proper formatting on this forum, but the ^ indicating where the error is is on the comma , after ImportError)

Does anyone know what is going wrong? It seems to me that there is an error in the plugin_install.py-file which then makes the installer believe that the pygobject and dbus-python are not installed, but they both are. Also, "hp-check -t" shows that all dependencies are there. Can anyone help me?

Offline

#2 2010-11-02 23:42:31

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: HPLIP: "Syntax error: invalid syntax" installing HP LaserJet 1018

Offline

#3 2010-11-02 23:59:19

doscervezas
Member
Registered: 2010-11-02
Posts: 6

Re: HPLIP: "Syntax error: invalid syntax" installing HP LaserJet 1018

Thanks for your quick reply! Changed /usr/bin/python to point to /usr/bin/python2, reran hp-setup and now it's working!

Offline

#4 2014-03-05 01:34:57

amrdarwish
Member
Registered: 2010-09-29
Posts: 19

Re: HPLIP: "Syntax error: invalid syntax" installing HP LaserJet 1018

Delete the /usr/bin/python file which is just a link to /usr/bin/python3
Change to /usr/bin folder
Create a new link, this time pointing to python 2.7
The commands

rm -rf /usr/bin/python
cd /usr/bin
ln -s /usr/bin/python2.7 python


إذا الشّعْبُ  يَوْمَاً  أرَادَ   الْحَيَـاةَ          فَلا  بُدَّ  أنْ  يَسْتَجِيبَ   القَـدَر
وَلا بُـدَّ  لِلَّيـْلِ أنْ  يَنْجَلِــي               وَلا  بُدَّ  للقَيْدِ  أَنْ   يَـنْكَسِـر
وَمَنْ  لَمْ  يُعَانِقْهُ  شَوْقُ  الْحَيَـاةِ          تَبَخَّـرَ  في  جَوِّهَـا   وَانْدَثَـر
  فَوَيْلٌ  لِمَنْ  لَمْ   تَشُقْـهُ   الْحَيَاةُ           مِنْ   صَفْعَـةِ  العَـدَم  المُنْتَصِر

Offline

#5 2014-03-05 01:47:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: HPLIP: "Syntax error: invalid syntax" installing HP LaserJet 1018

Please don't necrobump threads: https://wiki.archlinux.org/index.php/Fo … Bumping.27



Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB