• how to set Python 2 as default---Make gedit text editor default?


    I am 15 years old and have been working on learning programming language. I though it would be a good idea to start with python before C as C is much more complicated and I would like to have a basic understanding of programming before I dive in. i am using a Educational website my dad set me up with (he is an expert programmer and Linux user) and I wish to make Python 2 my default. when i run the python in my terminal i get this

    $ python
    Python 3.4.3 (default, Mar 25 2015, 17:13:50) 
    [GCC 4.9.2 20150304 (prerelease)] on linux
    Type "help", "copyright", "credits" or "license" for more information.

    But if I run python2 it is installed

    $ python2
    Python 2.7.9 (default, Dec 11 2014, 04:42:00) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    So how can i make python2 which is installed my default instead of python3

    Question 2
    I have gedit installed and would like to make it my default text editor over Kate.

    An answer for both question would help a lot.
    TAC_Tux :D

  • @TAC_Tux said:

    Question 2
    I have gedit installed and would like to make it my default text editor over Kate.

    If I recall you’re using Kde, there’s a default application setting within system settings.

    (Also there’s no need to advertise your age everywhere)

  • Q1 You can change it by removing the current symlink that points to python3 and then create a new one that points to python2. Though, you may experience issues if any of the python based applications you use expect python3 to be the default (AKA any of the python-* packages in the Arch repos. )

    sudo unlink /usr/bin/python
    sudo ln -s /usr/bin/python2 /usr/bin/python

    Q2 As @Wyn said, you can configure your default applications within KDE System Settings.


  • @lots-0-logs : I think that’s a bad idea. Arch uses python3 as default because all python programs are using python (when they want to use python3) and python2 when version 2 is needed. Changing links will make python apps break (not all, but many).

    @TAC_Tux : Please, if you want to learn python, learn python3 by all means! Python2 is only there for compatibility reasons. Everything is being ported to python3 nowadays. And if you learn python3 you will be able to help us with Cnchi, among other things xD

Posts 4Views 3121
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.