Ubuntu how to remove all Python 3 but not 2

I recently purchased a RackSpace Ubuntu server and it has pythons on it:

iPython in 3.5, Pandas in 3.4 and 2.7, the modules I need, such as pyodbc, etc., are only 2.7

Therefore, I try to clear the box and, as 2.7 users, save everything in 2.7.

So, the key question is: is there a way to remove both 3.4 and 3.5 at the same time, while maintaining Python 2.7?

+7
source share
6 answers

In the end, I decided that you cannot uninstall 3.4, since this is Ubuntu by default.

All I did was just uninstall Jupyterand then an alias python=python2.7and install all the packages again in Python 2.7.

, virtualenv 2.7. :)

+8

: , .

, python3.

, .

( )

sudo apt-get remove 'python3.*'
+10

Python 3 , , Linux. Firefox, , , , ! . Python 3. !

, :

https://askubuntu.com/q/384033/402539

https://askubuntu.com/q/810854/402539

+8

: sudo apt-get remove python3.7 ,

0
source

do not try either of the above methods, or sudo apt autoremove python3because it will remove from your system all applications based on gnome, including the gnome terminal. In case you made this mistake and left only kernal, try sudo apt install gnomekernal.

try changing the default version of Python instead of deleting it. You can do this using the bashrc file or the path export command .

0
source

Source: https://habr.com/ru/post/1619339/


All Articles