HPLIP: Installing HP Printer plugin
If you are installing a HP Printer on Arch Linux, and it is one that needs proprietary plugin, you may have problems while building that plugin.
This is because Arch Linux upgraded python from 2 to 3, so while you are running
hp-plugin, if you see this error:
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
You need to use python 2 to run the script instead of python 3, one easy way to do it is:
* The steps*
- Delete the
/usr/bin/pythonfile which is just a link to
- Change to
- Create a new link, this time pointing to python 2.7
rm -rf /usr/bin/python
ln -s /usr/bin/python2.7 python
But I preferred to make just an exception for this time, and create a temporal link, and leave the original one as it is.
- Go to
- Create the link to python2.7
- Add /tmp to the path
- Export the new PATH variable
link -s /usr/bin/python2.7 python
Now, you can run all the programs you need to use python2 and then just delete the link in the /tmp folder and you are done.