Python Forum
I can't remove python. I'm not kidding, it doesn't get uninstalled.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't remove python. I'm not kidding, it doesn't get uninstalled.
#1
I've spent like a week's worth of man-hours trying to get uwgsi to work (see https://python-forum.io/Thread-ImportErr...#pid104516 ), and my problem must be obscure because no one's advice works (or I get no responses to posts on forums), I got desperate so tried removing python and reinstalling it. It won't uninstall.

Ubuntu 18.04.2

sudo apt-get remove python.

It does a lot of stuff, clears up 250something MB.

I type python. I get a python prompt.
I type python2. I get a prompt.
I type python3. I get a prompt.

So I sudo apt-get remove python3.

Once again, it removes a bunch of packages, etc, clears up (now it's 500something MB)

I type python3.
I get a prompt.

It won't die.

It's not like I have it in some obscure place.

[email protected]:~/tdailydiscount$ which python
/usr/bin/python
[email protected]:~/tdailydiscount$ which python3
/usr/bin/python3
[email protected]:~/tdailydiscount$ which python2
/usr/bin/python2
How do I kill python so I can reinstall it?
Reply
#2
I'm afraid you broke your Ubuntu system. One must not remove python in a Ubuntu system. The gigabytes that were removed are other programs that depend on python. As a general rule, it is not a good idea to carry on with sudo apt-get remove when the system warns of a large bunch of removals. It means that you're doing something wrong. In your position, I would reinstall Ubuntu.
Reply
#3
OK when I reboot I get the CLI. It doesn't have network capability, but if I can get network capability to work then presumably I can just reinstall python (which ironically was still working so... uhhh... was still installed.)

So if I can reinstall python and all of its packages then presumably it might be ok?

oh you mean entire programs? Not just packages they depend on?
Reply
#4
david503 Wrote:oh you mean entire programs? Not just packages they depend on?
I mean that apt removed programs that depend on python to run. They won't be reinstalled if you attempt something like "reinstalling python", which by the way is probably unnecessary because in the end you still have python.

It is not difficult to reinstall ubuntu
  1. Save your personal files on an external hard drive before you do anything else.
  2. Burn a bootable DVD with the .iso image of Ubuntu 18.04 downloaded from the ubuntu website. They say that you can also create a bootable USB key instead of a DVD but usually I don't have much success with this.
  3. Reboot the computer on the DVD (make sure the computer is connected to the internet) and follow the installation instructions.
  4. Remove the DVD, reboot the computer and do sudo apt update and then sudo apt upgrade in a terminal.
  5. Reboot and enjoy a fresh install of Ubuntu.
Reply
#5
Yea yea I know how to reinstall ubuntu, thanks. (I'm a developer for 20+ years, so...). It's going to take about three days to reinstall everything again. I wish this had all happened two months from now because Ubuntu 20 LTS comes out in april. Ug. I can't hobble along on a livecd all the way till then so I gotta bite the bullet. Here I go.

thanks
Reply
#6
I realised that apt has a history log. By looking in the history log, one should be able to reinstall packages that were uninstalled.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  why doesn't python look in two directions Kakha 21 1,177 Jan-01-2021, 11:24 PM
Last Post: jefsummers
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 601 Oct-11-2020, 01:04 AM
Last Post: Larz60+
  Python: command “python -m pip install --upgrade pip” doesn't work apollo 2 2,262 Sep-16-2019, 03:11 PM
Last Post: snippsat
  Python says module doesn't exist... I say it does! EricMichel 2 1,284 May-14-2019, 03:26 AM
Last Post: EricMichel
  Python Code doesn't work! the_entrepreneur 5 1,767 Apr-20-2019, 08:05 AM
Last Post: SheeppOSU
  remove python package from openwrt aneeshyarose 1 2,612 Feb-28-2017, 02:07 PM
Last Post: sparkz_alot
  Python 3.6 Installed, But Doesn't Exist Atomike 3 39,321 Feb-27-2017, 09:44 PM
Last Post: snippsat
  Why doesn't this work in the Python Shell? diemildefreude 10 6,505 Oct-28-2016, 08:27 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020