Python 3 installation

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I checked my system to see which Python is installed. I realized it was version 2.7.12. Than I downloaded the last version from Python.org which is 3.6.5. Now I have a tar.xz archive file that I extracted to somewhere (currently "Downloads" folder). Now what? What should I do? Which file should I double-click to install?



Note: I also tried sudo apt-get install python3 which seemed to do things (commands running in terminal like in Matrix) but at the end when I rechecked the Python version it was the old 2.7.12 version.
Any suggestions?










share|improve this question



















  • 1




    try which python in terminal and see if it returns /usr/bin/python then do which python3 and see if it returns /usr/bin/python3 .. if so .. they are both installed .. my system has both .. if I want python3 .. I run python3 command.
    – John Orion
    Mar 29 at 19:12







  • 1




    if I do python --version I get Python 2.7.12 returned and if I do python3 --version I get Python 3.5.2 returned ,,, not the "latest" but the latest for Ubuntu's install :D
    – John Orion
    Mar 29 at 19:18







  • 2




    DON'T UNINSTALL any Python versions that you will find with your Ubuntu installation, it will break your system. If you want the latest Python version take a look at this
    – ceccoemi
    Mar 29 at 19:26






  • 2




    Please note that Python (both 2 and 3) are dependencies of important components of your Ubuntu system, like e.g. your package manager apt and many other things. You really don't want to mess your system up by removing one of these, setting them to an incorrect version (Python 2 and 3 are not compatible, one generally can't run scripts for the other without some adaption) or breaking them in any other way. Just search this site for questions of people who messed it up, you'll find many. Not few of them end with a system reinstall.
    – Byte Commander
    Mar 29 at 19:27






  • 1




    If anyone wants to use python3 with python command its safe to use this command echo alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink /usr/bin/python at all!
    – Ali Razmdideh
    Mar 29 at 19:31














up vote
0
down vote

favorite












I checked my system to see which Python is installed. I realized it was version 2.7.12. Than I downloaded the last version from Python.org which is 3.6.5. Now I have a tar.xz archive file that I extracted to somewhere (currently "Downloads" folder). Now what? What should I do? Which file should I double-click to install?



Note: I also tried sudo apt-get install python3 which seemed to do things (commands running in terminal like in Matrix) but at the end when I rechecked the Python version it was the old 2.7.12 version.
Any suggestions?










share|improve this question



















  • 1




    try which python in terminal and see if it returns /usr/bin/python then do which python3 and see if it returns /usr/bin/python3 .. if so .. they are both installed .. my system has both .. if I want python3 .. I run python3 command.
    – John Orion
    Mar 29 at 19:12







  • 1




    if I do python --version I get Python 2.7.12 returned and if I do python3 --version I get Python 3.5.2 returned ,,, not the "latest" but the latest for Ubuntu's install :D
    – John Orion
    Mar 29 at 19:18







  • 2




    DON'T UNINSTALL any Python versions that you will find with your Ubuntu installation, it will break your system. If you want the latest Python version take a look at this
    – ceccoemi
    Mar 29 at 19:26






  • 2




    Please note that Python (both 2 and 3) are dependencies of important components of your Ubuntu system, like e.g. your package manager apt and many other things. You really don't want to mess your system up by removing one of these, setting them to an incorrect version (Python 2 and 3 are not compatible, one generally can't run scripts for the other without some adaption) or breaking them in any other way. Just search this site for questions of people who messed it up, you'll find many. Not few of them end with a system reinstall.
    – Byte Commander
    Mar 29 at 19:27






  • 1




    If anyone wants to use python3 with python command its safe to use this command echo alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink /usr/bin/python at all!
    – Ali Razmdideh
    Mar 29 at 19:31












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I checked my system to see which Python is installed. I realized it was version 2.7.12. Than I downloaded the last version from Python.org which is 3.6.5. Now I have a tar.xz archive file that I extracted to somewhere (currently "Downloads" folder). Now what? What should I do? Which file should I double-click to install?



Note: I also tried sudo apt-get install python3 which seemed to do things (commands running in terminal like in Matrix) but at the end when I rechecked the Python version it was the old 2.7.12 version.
Any suggestions?










share|improve this question















I checked my system to see which Python is installed. I realized it was version 2.7.12. Than I downloaded the last version from Python.org which is 3.6.5. Now I have a tar.xz archive file that I extracted to somewhere (currently "Downloads" folder). Now what? What should I do? Which file should I double-click to install?



Note: I also tried sudo apt-get install python3 which seemed to do things (commands running in terminal like in Matrix) but at the end when I rechecked the Python version it was the old 2.7.12 version.
Any suggestions?







apt python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 29 at 19:43









Ali Razmdideh

3,18011436




3,18011436










asked Mar 29 at 19:06









S Bachar

91




91







  • 1




    try which python in terminal and see if it returns /usr/bin/python then do which python3 and see if it returns /usr/bin/python3 .. if so .. they are both installed .. my system has both .. if I want python3 .. I run python3 command.
    – John Orion
    Mar 29 at 19:12







  • 1




    if I do python --version I get Python 2.7.12 returned and if I do python3 --version I get Python 3.5.2 returned ,,, not the "latest" but the latest for Ubuntu's install :D
    – John Orion
    Mar 29 at 19:18







  • 2




    DON'T UNINSTALL any Python versions that you will find with your Ubuntu installation, it will break your system. If you want the latest Python version take a look at this
    – ceccoemi
    Mar 29 at 19:26






  • 2




    Please note that Python (both 2 and 3) are dependencies of important components of your Ubuntu system, like e.g. your package manager apt and many other things. You really don't want to mess your system up by removing one of these, setting them to an incorrect version (Python 2 and 3 are not compatible, one generally can't run scripts for the other without some adaption) or breaking them in any other way. Just search this site for questions of people who messed it up, you'll find many. Not few of them end with a system reinstall.
    – Byte Commander
    Mar 29 at 19:27






  • 1




    If anyone wants to use python3 with python command its safe to use this command echo alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink /usr/bin/python at all!
    – Ali Razmdideh
    Mar 29 at 19:31












  • 1




    try which python in terminal and see if it returns /usr/bin/python then do which python3 and see if it returns /usr/bin/python3 .. if so .. they are both installed .. my system has both .. if I want python3 .. I run python3 command.
    – John Orion
    Mar 29 at 19:12







  • 1




    if I do python --version I get Python 2.7.12 returned and if I do python3 --version I get Python 3.5.2 returned ,,, not the "latest" but the latest for Ubuntu's install :D
    – John Orion
    Mar 29 at 19:18







  • 2




    DON'T UNINSTALL any Python versions that you will find with your Ubuntu installation, it will break your system. If you want the latest Python version take a look at this
    – ceccoemi
    Mar 29 at 19:26






  • 2




    Please note that Python (both 2 and 3) are dependencies of important components of your Ubuntu system, like e.g. your package manager apt and many other things. You really don't want to mess your system up by removing one of these, setting them to an incorrect version (Python 2 and 3 are not compatible, one generally can't run scripts for the other without some adaption) or breaking them in any other way. Just search this site for questions of people who messed it up, you'll find many. Not few of them end with a system reinstall.
    – Byte Commander
    Mar 29 at 19:27






  • 1




    If anyone wants to use python3 with python command its safe to use this command echo alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink /usr/bin/python at all!
    – Ali Razmdideh
    Mar 29 at 19:31







1




1




try which python in terminal and see if it returns /usr/bin/python then do which python3 and see if it returns /usr/bin/python3 .. if so .. they are both installed .. my system has both .. if I want python3 .. I run python3 command.
– John Orion
Mar 29 at 19:12





try which python in terminal and see if it returns /usr/bin/python then do which python3 and see if it returns /usr/bin/python3 .. if so .. they are both installed .. my system has both .. if I want python3 .. I run python3 command.
– John Orion
Mar 29 at 19:12





1




1




if I do python --version I get Python 2.7.12 returned and if I do python3 --version I get Python 3.5.2 returned ,,, not the "latest" but the latest for Ubuntu's install :D
– John Orion
Mar 29 at 19:18





if I do python --version I get Python 2.7.12 returned and if I do python3 --version I get Python 3.5.2 returned ,,, not the "latest" but the latest for Ubuntu's install :D
– John Orion
Mar 29 at 19:18





2




2




DON'T UNINSTALL any Python versions that you will find with your Ubuntu installation, it will break your system. If you want the latest Python version take a look at this
– ceccoemi
Mar 29 at 19:26




DON'T UNINSTALL any Python versions that you will find with your Ubuntu installation, it will break your system. If you want the latest Python version take a look at this
– ceccoemi
Mar 29 at 19:26




2




2




Please note that Python (both 2 and 3) are dependencies of important components of your Ubuntu system, like e.g. your package manager apt and many other things. You really don't want to mess your system up by removing one of these, setting them to an incorrect version (Python 2 and 3 are not compatible, one generally can't run scripts for the other without some adaption) or breaking them in any other way. Just search this site for questions of people who messed it up, you'll find many. Not few of them end with a system reinstall.
– Byte Commander
Mar 29 at 19:27




Please note that Python (both 2 and 3) are dependencies of important components of your Ubuntu system, like e.g. your package manager apt and many other things. You really don't want to mess your system up by removing one of these, setting them to an incorrect version (Python 2 and 3 are not compatible, one generally can't run scripts for the other without some adaption) or breaking them in any other way. Just search this site for questions of people who messed it up, you'll find many. Not few of them end with a system reinstall.
– Byte Commander
Mar 29 at 19:27




1




1




If anyone wants to use python3 with python command its safe to use this command echo alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink /usr/bin/python at all!
– Ali Razmdideh
Mar 29 at 19:31




If anyone wants to use python3 with python command its safe to use this command echo alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink /usr/bin/python at all!
– Ali Razmdideh
Mar 29 at 19:31










2 Answers
2






active

oldest

votes

















up vote
1
down vote













The One right way to install python3 is



sudo apt-get install python3


or



sudo apt install python3 


Whether you use apt or apt-get doesn't matter in this case; it is just a personal habit. apt is a front-end for apt-get but for this command there's no difference, so both are fine.



Once installed you have the new command python3.



Python is somehow special in that there are two major versions: python2 and python3. When you install or update (or call) python you'll get the python2 line.



Some time ago the Python developers decided to release a completely new version of Python with new features and new syntax. To not break existing programs, this new version is called python3. So it's completely safe (and usual) to have both python (V2) and python3 installed at the same time. Some of your existing programs will use python (V2) and some of them will use python3. The majority will currently use python (V2) (because they aren't rewritten yet to comply with python3's syntax), so do NOT uninstall python (V2).



See also How can I remove python 2.7 after installing python 3.3?. The question is five years old but still valid. The outcome is don't!






share|improve this answer





























    up vote
    0
    down vote













    Since you have downloaded the source tar files, You have to use the configure, make and make install utilities. As demonstrated here. Change to the extracted directory run those commands. you may leave the --prefix part if you want to replace the system's current installed Python version.






    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1020357%2fpython-3-installation%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      The One right way to install python3 is



      sudo apt-get install python3


      or



      sudo apt install python3 


      Whether you use apt or apt-get doesn't matter in this case; it is just a personal habit. apt is a front-end for apt-get but for this command there's no difference, so both are fine.



      Once installed you have the new command python3.



      Python is somehow special in that there are two major versions: python2 and python3. When you install or update (or call) python you'll get the python2 line.



      Some time ago the Python developers decided to release a completely new version of Python with new features and new syntax. To not break existing programs, this new version is called python3. So it's completely safe (and usual) to have both python (V2) and python3 installed at the same time. Some of your existing programs will use python (V2) and some of them will use python3. The majority will currently use python (V2) (because they aren't rewritten yet to comply with python3's syntax), so do NOT uninstall python (V2).



      See also How can I remove python 2.7 after installing python 3.3?. The question is five years old but still valid. The outcome is don't!






      share|improve this answer


























        up vote
        1
        down vote













        The One right way to install python3 is



        sudo apt-get install python3


        or



        sudo apt install python3 


        Whether you use apt or apt-get doesn't matter in this case; it is just a personal habit. apt is a front-end for apt-get but for this command there's no difference, so both are fine.



        Once installed you have the new command python3.



        Python is somehow special in that there are two major versions: python2 and python3. When you install or update (or call) python you'll get the python2 line.



        Some time ago the Python developers decided to release a completely new version of Python with new features and new syntax. To not break existing programs, this new version is called python3. So it's completely safe (and usual) to have both python (V2) and python3 installed at the same time. Some of your existing programs will use python (V2) and some of them will use python3. The majority will currently use python (V2) (because they aren't rewritten yet to comply with python3's syntax), so do NOT uninstall python (V2).



        See also How can I remove python 2.7 after installing python 3.3?. The question is five years old but still valid. The outcome is don't!






        share|improve this answer
























          up vote
          1
          down vote










          up vote
          1
          down vote









          The One right way to install python3 is



          sudo apt-get install python3


          or



          sudo apt install python3 


          Whether you use apt or apt-get doesn't matter in this case; it is just a personal habit. apt is a front-end for apt-get but for this command there's no difference, so both are fine.



          Once installed you have the new command python3.



          Python is somehow special in that there are two major versions: python2 and python3. When you install or update (or call) python you'll get the python2 line.



          Some time ago the Python developers decided to release a completely new version of Python with new features and new syntax. To not break existing programs, this new version is called python3. So it's completely safe (and usual) to have both python (V2) and python3 installed at the same time. Some of your existing programs will use python (V2) and some of them will use python3. The majority will currently use python (V2) (because they aren't rewritten yet to comply with python3's syntax), so do NOT uninstall python (V2).



          See also How can I remove python 2.7 after installing python 3.3?. The question is five years old but still valid. The outcome is don't!






          share|improve this answer














          The One right way to install python3 is



          sudo apt-get install python3


          or



          sudo apt install python3 


          Whether you use apt or apt-get doesn't matter in this case; it is just a personal habit. apt is a front-end for apt-get but for this command there's no difference, so both are fine.



          Once installed you have the new command python3.



          Python is somehow special in that there are two major versions: python2 and python3. When you install or update (or call) python you'll get the python2 line.



          Some time ago the Python developers decided to release a completely new version of Python with new features and new syntax. To not break existing programs, this new version is called python3. So it's completely safe (and usual) to have both python (V2) and python3 installed at the same time. Some of your existing programs will use python (V2) and some of them will use python3. The majority will currently use python (V2) (because they aren't rewritten yet to comply with python3's syntax), so do NOT uninstall python (V2).



          See also How can I remove python 2.7 after installing python 3.3?. The question is five years old but still valid. The outcome is don't!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 29 at 20:16

























          answered Mar 29 at 19:37









          PerlDuck

          3,92811030




          3,92811030






















              up vote
              0
              down vote













              Since you have downloaded the source tar files, You have to use the configure, make and make install utilities. As demonstrated here. Change to the extracted directory run those commands. you may leave the --prefix part if you want to replace the system's current installed Python version.






              share|improve this answer
























                up vote
                0
                down vote













                Since you have downloaded the source tar files, You have to use the configure, make and make install utilities. As demonstrated here. Change to the extracted directory run those commands. you may leave the --prefix part if you want to replace the system's current installed Python version.






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Since you have downloaded the source tar files, You have to use the configure, make and make install utilities. As demonstrated here. Change to the extracted directory run those commands. you may leave the --prefix part if you want to replace the system's current installed Python version.






                  share|improve this answer












                  Since you have downloaded the source tar files, You have to use the configure, make and make install utilities. As demonstrated here. Change to the extracted directory run those commands. you may leave the --prefix part if you want to replace the system's current installed Python version.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 29 at 20:03









                  rulebreaker4

                  860413




                  860413



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1020357%2fpython-3-installation%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                      Trouble downloading packages list due to a “Hash sum mismatch” error

                      How do I move numbers in filenames, in a batch renaming operation?