Score:0

Repair WSL Ubuntu Python Installation

gd flag

I'm using WSL Ubuntu, recently upgraded from 18.04 to 20.04. I was trying to install python 3.8, and apparently had to remove the old bionic python 3.8. After doing so, I keep running into the following error:

E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success

I'm unable to remove the other bionic packages, and I'm unable to call sudo apt autoremove. I'm still not able to install python3.8 focal due to the bionic dependencies.

If you have any suggestions to fix this issue, please let me know! Thanks!

us flag
Bionic (18.04) has python3.6. Ubuntu 20.04 uses python3.8, which you have removed. Python is a core component of Ubuntu. **Reinstall Ubuntu**.
David avatar
cn flag
You messed with python and killed the OS. Reinstall.
mchid avatar
bo flag
May I ask how you installed the replacement version of Python? This may be a symptom, not the cause of the problem. You shouldn't replace the default Python version. However, you can have more than one installed. Assuming the original version of Python is still installed, [does this solution fix the issue](https://askubuntu.com/q/1123159/167115)?
NotTheDr01ds avatar
vn flag
Agree with @Someone. WSL tends to have issues with upgrading Ubuntu unless Snap is removed first. I'm thinking that either you didn't remove it, or you did, but the apt hook got left behind. Let us know if renaming `20snapd.conf` doesn't take care of it, and we can dig further. Regardless, I feel you have a good chance of resolving this without a reinstall.
Cognito avatar
gd flag
Looks like removing the snap file fixed the issue. Python 3.8 is available again. If I run into problems, I’ll try reinstalling.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.