1

I have a big problem, I was trying to use Python3 on my PC and it seemed like Python3 wasn't there, I tried installing it and it said Python3 is already installed.

So I uninstalled python3 and reinstalled it, that's when everything stopped functioning properly, then I rebooted the PC and it showed a long log then got stuck and doesn't even reach the lock screen.

I firstly ran 'sudo apt update'. Then ran 'sudo apt install software-properties-common' and it successfully installed. Next I ran 'sudo add-apt-repository ppa:deadsnakes/ppa' After I ran 'sudo apt update' again.

second step I ran 'sudo apt install python3.8' Out put indicated that python3.8 is already installed. When checking the version with 'python ––version' Output was "command not found"

That's when I ran 'sudo apt remove python3.8' then after that 'sudo apt install python3.8' It did install some of the files and finished but things stopped functioning.

I would show the log if I knew how

output upon boot

  • Edited to the best clarity I could give for now – ice rhymes raven Apr 29 '21 at 17:31
  • Do you have access to a shell prompt? – user535733 Apr 29 '21 at 18:03
  • I think I did run python3 --version and got the same error, but I'm not sure now since I can't check the commands I ran. I do have access to shell prompt (I think) since I'm able to boot into recovery mode. It's possible to access shell from there. – ice rhymes raven Apr 29 '21 at 18:09
  • If you have access to a shell prompt, then you can see your logs. Look at /var/log/apt/history.log: What was removed? And what was installed? Look at /var/log/apt/term.log: What was the exact error that apt encountered? – user535733 Apr 29 '21 at 18:13
  • '/var/log/apt/history.log' returns output = Permission denied. Then I ran 'sudo /var/log/apt/history.log' and it returns output = command not found – ice rhymes raven Apr 29 '21 at 18:22
  • Those are not commands. Those are your logfiles. You view them using a viewer (cat or more or less). Oh, dear. If this does not work out, will you be able to make a new LiveUSB installer in order to reinstall Ubuntu? Or do you have one already? – user535733 Apr 29 '21 at 18:25
  • I don't have one yet. I'll have to create one a bit later. Thanks for your help. If there's another method I can try please let me know. – ice rhymes raven Apr 29 '21 at 18:31
  • 1
    There's no single incantation that will undo the damage you caused. You must understand your way out of the problem. The skills required are fairly minimal. You can reinstall if you want a working system again in about an hour. Or you can learn, which will take a bit longer. It's your choice. – user535733 Apr 29 '21 at 18:36

2 Answers2

1

Python is an important part of Ubuntu, removing it will most likely harm your installation (because dependent packages have been removed as well).

I'd advise you to save your data and set up a new system. You should never remove python from a linux distro.

See more answers concerning the removal of python....

kanehekili
  • 6,402
0

By running sudo apt-get install python3-all Then sudo apt-get install --reinstall ubuntu-desktop solved my problem.