0

I was having some issues with python on my kubuntu 21.10 (for so reason apt installed it to home rather than usr, which meant it wasn't on the path and I couldn't import any modules I pip installed.

To fix this, I tried to remove python using apt. This promptly broke the desktop and moved me to a terminal screen but with no input. Now if I try to boot into desktop my system just hangs on manufacture (Acer swift 3) logo.

Is there a workaround (could I try installing the kubuntu desktop from the recovery terminal) or should I just reinstall kubuntu? I'm on kubuntu 21.10.

Thanks.

  • 1
    Virtually everything in Ubuntu runs on Python. You may have to reinstall the OS to recover here. – Zeiss Ikon Mar 18 '22 at 19:22
  • 1
    I have answered how to recover the desktop. If you have a question about setting up a python environment, please ask a new one. Please don't ask multiple questions in a single post. – Archisman Panigrahi Mar 18 '22 at 19:30
  • There are more than 100 similar questions about removing python3 in this forum. You should've searched before you got yourself in such a mess. Removing python3 is like taking the pistons out of a car motor – kanehekili Mar 18 '22 at 21:02
  • You may find apt doesn't work too... as if you removed the default python; everything that requires python will stop working... Basic tools may work; ie. wget to download packages & dpkg to install, but higher end user tools (like apt) tend to need python. You'll need python3-minimal installed to have apt and apt-get work even at text terminal (text terminal doesn't require python so can be used even though you've crippled your GUI) – guiverc Mar 18 '22 at 21:27
  • Apologies I think I was being in too specific in my search and so had not returned the duplicate questions. Thanks for the help @ArchismanPanigrahi, I have edited the question to remove the additional tangent. – julesj41 Mar 18 '22 at 21:38

1 Answers1

1

You cannot run Ubuntu without Python.


Open a virtual TTY console with Ctrl+Alt+F3, and login.

Connect to internet with USB tethering from your phone.

Install the Kubuntu desktop. It should install all the necessary components including python.

sudo apt install --reinstall kubuntu-desktop^

If it does not work, you will have to reinstall.

When you remove something in the terminal, you should always check which packages are being removed.

Lorenz Keel
  • 8,905
Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212