PDA

View Full Version : Resetting, removing, reinstalling Python



ubuntini2
October 6th, 2019, 12:45 AM
On Ubuntu (Mate) 18.04.1 LTS

My PYTHONPATH is


:/home/jim/ytini/yt-conda/bin:/home/jim/ytini/yt-conda/sbin

$python -V

returns


Python 2.7.16 :: Anaconda, Inc.


So my question is, how do I start from a blank slate. ie remove ALL Python installs and reinstall a new version or Python 2.7?

Skaperen
October 6th, 2019, 01:12 AM
what do you get from this command? dpkg -l|fgrep python

ubuntini2
October 6th, 2019, 03:29 PM
You asked :p

https://paste.ubuntu.com/p/hntNrqZcFW/

ubfan1
October 6th, 2019, 05:01 PM
Don't uninstall python, your system relies heavily on it, and you will get a nasty surprise when you try to install anything! The python you want to remove looks like a local copy. Try unsetting the PYTHONPATH and see if the result lets the system version be used. /usr/bin/python is just a link to /usr/bin/python2.7, so if your /usr/bin is before your home dir in your PATH, the system python should run with the 'python" command