Python on Linux - Install/uninstall/reinstall

avanturismo

Member
Joined
Dec 27, 2021
Messages
35
Reaction score
8
Credits
248
Dear Linux community

I'm trying to uninstall previously installed python3
after uninstall process I'm checking in terminal for python version (in case its not uninstalled)
```$ python3 --version```
Please see screen attached

I'm not sure if its properly uninstalled

what does it means on the screen - goroutine 6 [running] ?
it is uninstalled? if yes what is the right way to install it again?

btw Im using latest Ubuntu

In advance I would like to thank you for Your attention and being so helpful for random noobs like me
 

Attachments

  • Screenshot from 2022-01-23 14-21-16.png
    Screenshot from 2022-01-23 14-21-16.png
    59.7 KB · Views: 329


rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
685
Reaction score
559
Credits
4,079
I don't think you can uninstall python the way you think. A lot of applications, if not all, are so deeply dependent on it that you'd have to uninstall everything in order to remove it. I tried to uninstall python once and after the cry for the 15th dependency I gave up.
 

JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,759
Reaction score
2,549
Credits
14,682
Attempting to remove Python is not a good idea. Python is installed by default on most Linux distributions and is used by various system scripts. And it may even be used by several applications that are installed on your system too.

Also Python2 is EOL, so Python3 is the default Python on an increasing number of distros.

By removing Python3, you could completely bork your install!
 

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
518
Reaction score
632
Credits
5,230
Installing, upgrading and uninstalling Python is especially problematic on Linux, because many of the administration tools of most of the distributions are written in Python, and sometimes, when you try to unistall it, "things can happen" like, for example, uninstall most of Gnome Desktop Environment.

For what is worth, in your case it seems you have installed Python 3.9 under your home folder. If that is so, what I would do is:

1. Back up all your files, just in case everthing fails and you need to reinstall the system
2. Dump your environment variables to see what python is declared in your environment:
Code:
set | grep ython
3. See where is the system python pointing:
Code:
ls -l $(which python)
If you don't see any trouble, meaning that nothing is pointing to /home/master/Python-3.9, then just remove that folder.

Going forward, I strongly recommend using virtual environments and using one of them for each project, without ever fiddling with the system installation of Python under any circumstance.
 

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510
Dear Linux community

I'm trying to uninstall previously installed python3
after uninstall process I'm checking in terminal for python version (in case its not uninstalled)
```$ python3 --version```
Please see screen attached

I'm not sure if its properly uninstalled

what does it means on the screen - goroutine 6 [running] ?
it is uninstalled? if yes what is the right way to install it again?

btw Im using latest Ubuntu

In advance I would like to thank you for Your attention and being so helpful for random noobs like me
Best to leave it as some software are dependent on it.
 
OP
avanturismo

avanturismo

Member
Joined
Dec 27, 2021
Messages
35
Reaction score
8
Credits
248
thank You so much for Your answers. however I did uninstall before I read Your answers. now Im having looping log in screen with "Authentication error"

please advice the silly noob;(
:facepalm:
 

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
518
Reaction score
632
Credits
5,230
The uninstall operation most like would have removed one or more PAM (authentication modules).

If someone else knows that system so well to recommend an actual fix (I don't), pease do. Otherwise my best advise in terms of time v. benefits is to boot your computer with a Live distribution on a USB drive, mount your fixed drive partitions to rescue your data, and reinstall your system.
 
OP
avanturismo

avanturismo

Member
Joined
Dec 27, 2021
Messages
35
Reaction score
8
Credits
248
well shit happens... I dont have much important files on this computer however that will be good experience not to play around... still any advices?
 

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510
well shit happens... I dont have much important files on this computer however that will be good experience not to play around... still any advices?
just reinstall the python3 version you uninstalled
 

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
10,109
Reaction score
8,684
Credits
83,584
Huh... It appears that I never hit send on my comment.

My comment was asking if this was the default Python you were trying to uninstall - but I see others have gotten there ahead of me. Darn me and my not hitting the submit button!

I've said this a couple times on this forum. I'll probably say it again.

DO NOT REMOVE THE DEFAULT PYTHON. YOU WILL BREAK THINGS.

Frankly, I wouldn't even try to fix it. I'd restore from backup or use a live USB to recover my data and do a nice clean install.

If you need a different version of Python than the default, install the different Python alongside the default Python. That's really the only way.
 
OP
avanturismo

avanturismo

Member
Joined
Dec 27, 2021
Messages
35
Reaction score
8
Credits
248
Huh... It appears that I never hit send on my comment.

My comment was asking if this was the default Python you were trying to uninstall - but I see others have gotten there ahead of me. Darn me and my not hitting the submit button!

I've said this a couple times on this forum. I'll probably say it again.

DO NOT REMOVE THE DEFAULT PYTHON. YOU WILL BREAK THINGS.

Frankly, I wouldn't even try to fix it. I'd restore from backup or use a live USB to recover my data and do a nice clean install.

If you need a different version of Python than the default, install the different Python alongside the default Python. That's really the only way.
well, this is how we learn :) very sad but luckly I dont have anything very important on that computer. But setting everything from the beginning will be pain in the ass...
 

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510
well, this is how we learn :) very sad but luckly I dont have anything very important on that computer. But setting everything from the beginning will be pain in the ass...
Just reinstall it, it won't take long to get set back up.
 
OP
avanturismo

avanturismo

Member
Joined
Dec 27, 2021
Messages
35
Reaction score
8
Credits
248
well ok I will reinstall, but cant backup my data right?

is it matters if I use SD card instead of USB?
 
OP
avanturismo

avanturismo

Member
Joined
Dec 27, 2021
Messages
35
Reaction score
8
Credits
248
restarting PC end ups here...
 

Attachments

  • photo_2022-01-23_18-36-25.jpg
    photo_2022-01-23_18-36-25.jpg
    31.1 KB · Views: 222

BoringZombie

Active Member
Joined
Apr 1, 2021
Messages
365
Reaction score
185
Credits
2,510

Members online


Latest posts

Top