MInt 19: python3 upgrade messed up. Update manager blocked.
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
I was using this method for years with no problem. You know, old habits die hard.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
The folder /usr/share/hplip has a folder named ui4, but a folder named ui5 is needed.
Do this: Run Linux Mint 19 from the USB or DVD.
Locate the folder /usr/share/hplip/ui5.
Copy ui5 into the main system (open as administrator /usr/share/hplip)
Shut down. Run Linux Mint 19 as usual.
From the terminal do a "sudo apt-get upgrade", and python3.6 will be upgraded.
After that the update manager will be able to install the hanging updates.
Do this: Run Linux Mint 19 from the USB or DVD.
Locate the folder /usr/share/hplip/ui5.
Copy ui5 into the main system (open as administrator /usr/share/hplip)
Shut down. Run Linux Mint 19 as usual.
From the terminal do a "sudo apt-get upgrade", and python3.6 will be upgraded.
After that the update manager will be able to install the hanging updates.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
Is the conclusion that the problem described in this thread is a special case caused by user action and it is safe for most users to accept the python3 upgrade in LM 19?
Version: LM 21.3 64bit Mate "If something is worth doing, it is worth doing for free."
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
Sort of. If you never messed with the hp drivers then this particular problem will never affect you.
My conclusion would be, however, that it's always better to do a clean install. The upgrade script is pretty good but it cannot foresee all the possible modifications you have done to your system.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
How did you remove the downloaded hplip? I have tried and tried and keep getting the same error
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
Check the contents of this folder /usr/share/hplip and see if you have ui4 or a ui5 subfolder.
If it's ui4 follow Gunnar_b's summary a few posts up - that is probably the safest/quickest way of getting the updates sorted out.
I'm not sure what the process is to remove the HP version of HPLIP, but you could try
apt purge hplip*
followed by apt install hplip-data hplip-gui
after the rest of the updates have cleared.For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
-
- Level 1
- Posts: 33
- Joined: Fri Jun 05, 2015 11:32 am
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
sudo dpkg -i /var/cache/apt/archives/*.deb
sudo dpkg --configure -a
...
apt purge hplip*
apt install hplip-data hplip-gui
Above commands fixed it for me. thanks!
linux mint 20.3 / 5.4.0 kernel
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
There seems to be a great deal of users out there that are having problems with Python 3 , Mint 19, HPLIP, ui5 directory is not available.
Everyone knows there is an issue.
This is my fix.. New install and not an upgrade from 18.3.
It may not work for everyone, but it worked for me on two new systems.
On a new install when it is finished, run the prerequisites on startup. Important
When finished, run your sudo apt-get update and upgrade from the terminal.
Go to https://developers.hp.com/hp-linux-imaging-and-printing and download the hplip file.
Your download file run: sh hplip-3.18.6.run
You will have python file that cannot install. Ignore.
No errors.
This was my 3rd install on 19 and it worked.
P.S. Been doing Linux for the past 20 years..
I hope this helps.
Everyone knows there is an issue.
This is my fix.. New install and not an upgrade from 18.3.
It may not work for everyone, but it worked for me on two new systems.
On a new install when it is finished, run the prerequisites on startup. Important
When finished, run your sudo apt-get update and upgrade from the terminal.
Go to https://developers.hp.com/hp-linux-imaging-and-printing and download the hplip file.
Your download file run: sh hplip-3.18.6.run
You will have python file that cannot install. Ignore.
No errors.
This was my 3rd install on 19 and it worked.
P.S. Been doing Linux for the past 20 years..
I hope this helps.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
No. The 3.18.6 installer is explicitly not compatible with Mint 19 and using it on Mint 19 is IMHO dangerous. There is nothing wrong with the repo version of HPLIP and HPLIP-GUI unless you have a very recent model HP printerphcs wrote: ⤴Sat Jul 14, 2018 6:20 am Go to https://developers.hp.com/hp-linux-imaging-and-printing and download the hplip file.
Your download file run: sh hplip-3.18.6.run
You will have python file that cannot install. Ignore.
No errors.
This was my 3rd install on 19 and it worked.
P.S. Been doing Linux for the past 20 years..
I hope this helps.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
Heh ... I am sure it is dangerous. I have little choice because the user I am supporting went out and bought a a LaserJet Pro M28w without knowing to check linux compatibility ... I am running through it now (via teamviewer no less, she lives 300 miles from me!) and it is taking FOREVER! Most dist-upgrades have taken less time than this... Maybe something to do with the mint19 incompatibility. I hope it will still boot after this...(!)
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
I had the same problem as the OP. My solution was the following:
make a symbolic link of the ui4 directory in the ui5 directory, make a copy of setupdialog_base.py named setupdialog_base5.py, move the copied file into the ui5 directory, update and upgrade your system.
Hope this helps
make a symbolic link of the ui4 directory in the ui5 directory, make a copy of setupdialog_base.py named setupdialog_base5.py, move the copied file into the ui5 directory, update and upgrade your system.
Code: Select all
cd /usr/share/hplip/ui4 && sudo ln * /usr/share/hplip/ui5/ && sudo cp setupdialog_base.py setupdialog_base5.py && sudo mv setupdialog_base5.py /../ui5/ && sudo apt-get update && sudo apt-get upgrade
-
- Level 1
- Posts: 2
- Joined: Thu Nov 22, 2018 6:50 am
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
Hi,
I'm having the same problem as well. I also had hplip installed from the hplip site, and have removed it trying to troubleshoot this problem.
When doing the update, I get this message:
E: python3: installed python3 package post-installation script subprocess returned error exit status 4
And more detailed messages:
I would greatly appreciate any help. Many thanks.
I'm having the same problem as well. I also had hplip installed from the hplip site, and have removed it trying to troubleshoot this problem.
When doing the update, I get this message:
E: python3: installed python3 package post-installation script subprocess returned error exit status 4
And more detailed messages:
Code: Select all
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up python3 (3.6.7-1~18.04) ...
running python rtupdate hooks for python3.6...
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/__init__.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aboutdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aboutdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aligndialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aligndialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/cleandialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/cleandialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/colorcaldialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/colorcaldialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devicesetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devicesetupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/deviceuricombobox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr5.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr5_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr_ext.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabgrouptable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabnametable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabwindow.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabwindow_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/faxsetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/faxsetupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/filetable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/firmwaredialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/firmwaredialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/infodialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/infodialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/linefeedcaldialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/linefeedcaldialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/loadpapergroupbox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/makecopiesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/makecopiesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/mimetypesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/mimetypesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/nodevicesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/nodevicesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindiagnose.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindiagnose_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pluginlicensedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pluginlicensedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pqdiagdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pqdiagdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printernamecombobox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettings_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingsdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingsdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingstoolbox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printtestpagedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printtestpagedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/queuesconf.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/readonlyradiobutton.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/sendfaxdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/sendfaxdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/settingsdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/settingsdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog_base5.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systemtray.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systrayframe.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systrayframe_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/ui_utils.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/upgradedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/upgradedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/wifisetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/wifisetupdialog_base.py'
error running python rtupdate hook hplip-data
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 4
Errors were encountered while processing:
python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up python3 (3.6.7-1~18.04) ...
running python rtupdate hooks for python3.6...
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/__init__.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aboutdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aboutdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aligndialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aligndialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/cleandialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/cleandialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/colorcaldialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/colorcaldialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devicesetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devicesetupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/deviceuricombobox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr5.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr5_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr_ext.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabgrouptable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabnametable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabwindow.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabwindow_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/faxsetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/faxsetupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/filetable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/firmwaredialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/firmwaredialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/infodialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/infodialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/linefeedcaldialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/linefeedcaldialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/loadpapergroupbox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/makecopiesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/makecopiesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/mimetypesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/mimetypesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/nodevicesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/nodevicesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindiagnose.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindiagnose_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pluginlicensedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pluginlicensedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pqdiagdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pqdiagdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printernamecombobox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettings_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingsdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingsdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingstoolbox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printtestpagedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printtestpagedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/queuesconf.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/readonlyradiobutton.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/sendfaxdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/sendfaxdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/settingsdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/settingsdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog_base5.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systemtray.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systrayframe.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systrayframe_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/ui_utils.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/upgradedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/upgradedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/wifisetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/wifisetupdialog_base.py'
error running python rtupdate hook hplip-data
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 4
dpkg: dependency problems prevent processing triggers for gnome-menus:
gnome-menus depends on python3:any (>= 3.1~); however:
Package python3 is not configured yet.
dpkg: error processing package gnome-menus (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
python3
gnome-menus
I would greatly appreciate any help. Many thanks.
Last edited by Anonymous on Sat Nov 24, 2018 1:30 am, edited 1 time in total.
Reason: Added code tag
Reason: Added code tag
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
As far as I recall the problem is not removing the default hplip packages before installing HP's version as they tell you to.rameshkumar wrote: ⤴Thu Nov 22, 2018 6:57 am Hi,
I'm having the same problem as well. I also had hplip installed from the hplip site, and have removed it trying to troubleshoot this problem
Try
Code: Select all
sudo rm /usr/share/python3/runtime.d/hplip-data.rtupdate
Code: Select all
apt purge --autoremove hplip hplip-data
PS: It's generally preferred that you make your own thread.
-
- Level 1
- Posts: 2
- Joined: Thu Nov 22, 2018 6:50 am
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
I am now 100% convinced switching to Linux and particularly to Mint was the right thing to do 5 years ago. Never had a problem since then, except for this one and which got resolved so quickly.
I really appreciate your help and to the community for such a pain-free computing platform/distro. Thank you so very much _/|\_
I really appreciate your help and to the community for such a pain-free computing platform/distro. Thank you so very much _/|\_
I thought it was a similar problem, hence best to post in the same thread. Now I know to open a different thread for each new problem. Apologies and thanks for the tip.PS: It's generally preferred that you make your own thread.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
It seems to be a similar problem, but there are a few solutions presented here that you didn't even say you tried, but let's assume for your benefit that you did and they didn't work. That makes it a dissimilar problem then. It seems my approach worked for you but it is now buried in a thread of 3 pages that you cannot even mark as SOLVED because it is not your own. And if it hadn't worked we might have had to add another 3 pages of confusion. Either way it's messy and probably won't help other users in the future.rameshkumar wrote: ⤴Thu Nov 22, 2018 10:51 pmI thought it was a similar problem, hence best to post in the same thread. Now I know to open a different thread for each new problem. Apologies and thanks for the tip.PS: It's generally preferred that you make your own thread.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
sudo rm /usr/share/python3/runtime.d/hplip-data.rtupdate
Try This. This seemed to work for me.
Try This. This seemed to work for me.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
worked! thanks!sudo rm /usr/share/python3/runtime.d/hplip-data.rtupdate
Try This. This seemed to work for me.
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
I want to express my Thanks as I have had this issue on my Work Laptop. This fixed it for me.bluesky509 wrote: ⤴Fri Jul 13, 2018 7:09 pmsudo dpkg -i /var/cache/apt/archives/*.deb
sudo dpkg --configure -a
...
apt purge hplip*
apt install hplip-data hplip-gui
Above commands fixed it for me. thanks!
Re: MInt 19: python3 upgrade messed up. Update manager blocked.
Thank you so much smurphos! I actually use Ubuntu 18.04 but it removed the damage done by HP.com's hplip! I had used the script from HP to install hplip, not realizing that there's already one available in the canonical 18.04 repository. So python3 re-installed, as well as hplip-data, without even a hiccup. Those four lines you gave have saved me so much grief. I really need to study up on this repository stuff.You could try removing hplip and trying to reinstall python
apt purge hplip-data
apt autoremove
apt install --reinstall python3
apt install hplip-data