I was having the similar problem, Not being able to install hplip from the .run file due to a dependency on python2. But the problem was solved, After fully removing the installed version of hplib and also removing /usr/share/hplib dir.
afterward I just followed the hint here and ran "sudo apt install --reinstall printer-driver-hpcups printer-driver-postscript-hp libsane-hpaio hplip-gui hplip hplip-data libhpmud0"
I was having the similar problem, Not being able to install hplip from the .run file due to a dependency on python2. But the problem was solved, After fully removing the installed version of hplib and also removing /usr/share/hplib dir.
afterward I just followed the hint here and ran "sudo apt install --reinstall printer- driver- hpcups printer- driver- postscript- hp libsane-hpaio hplip-gui hplip hplip-data libhpmud0"
Everything is working fine now.
Thanks a lot