I have purged python3.5 and its dependencies on Ubuntu 16.04, wanting to use 3.7 instead. Now, upon logging in, I have no access to anything, not even a terminal. How can I fix this?
Asked
Active
Viewed 32 times
0
python
is rather critical for many Ubuntu tools (including agnome-terminal
), so I'd login to a text terminal and reverse whatever you did. You'll find many auto tools (apt
,apt-get
) may not work until python3 is restored to normal, butdpkg
and like core tools will still work so it'll be more manual. Reversing your changes is easiest, be it restore a backup, or using history &apt
logs, but as we don't know what you did, you'll have the best clue. – guiverc Dec 10 '20 at 23:28python -V; python3 -V
to report correct values for your release. Once you'vepython3-minimal
installed again (as long as it's not interfered with by any changes you made), the rest will be easy. Text terminals are not impacted by python changes (unless you've added python specific commands in login scripts). – guiverc Dec 10 '20 at 23:31python3-minimal
(minimum subset required). You'll have to avoid any tools that need python (ie. GUI,apt
& like front-end user tools) & stick to basic tools (text terminal,dpkg
etc are coded in C, user-geared tools are often python). Download usingwget
& usedpkg -i
to install given you removed access toapt-get
being usable I bet.. – guiverc Dec 10 '20 at 23:38apt-get purge
would be reversed byapt-get install
, however you need to fix the python issue beforeapt-get
will work... thus using the lower-level tools;apt-get
is a front-end for, ie.wget
&dpkg
as I've already said.. thepython3-minimal
is the core package you'll need to get re-installed, then you'll find you can use higher-level tools likeapt-get
again making it easier – guiverc Dec 10 '20 at 23:42