Python 3 installation

Clash 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?
apt python
 |Â
show 3 more comments
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?
apt python
1
trywhich pythonin terminal and see if it returns/usr/bin/pythonthen dowhich python3and see if it returns/usr/bin/python3.. if so .. they are both installed .. my system has both .. if I want python3 .. I runpython3command.
â John Orion
Mar 29 at 19:12
1
if I dopython --versionI getPython 2.7.12returned and if I dopython3 --versionI getPython 3.5.2returned ,,, 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 manageraptand 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 usepython3withpythoncommand its safe to use this commandecho alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink/usr/bin/pythonat all!
â Ali Razmdideh
Mar 29 at 19:31
 |Â
show 3 more comments
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?
apt python
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
apt python
edited Mar 29 at 19:43
Ali Razmdideh
3,18011436
3,18011436
asked Mar 29 at 19:06
S Bachar
91
91
1
trywhich pythonin terminal and see if it returns/usr/bin/pythonthen dowhich python3and see if it returns/usr/bin/python3.. if so .. they are both installed .. my system has both .. if I want python3 .. I runpython3command.
â John Orion
Mar 29 at 19:12
1
if I dopython --versionI getPython 2.7.12returned and if I dopython3 --versionI getPython 3.5.2returned ,,, 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 manageraptand 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 usepython3withpythoncommand its safe to use this commandecho alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink/usr/bin/pythonat all!
â Ali Razmdideh
Mar 29 at 19:31
 |Â
show 3 more comments
1
trywhich pythonin terminal and see if it returns/usr/bin/pythonthen dowhich python3and see if it returns/usr/bin/python3.. if so .. they are both installed .. my system has both .. if I want python3 .. I runpython3command.
â John Orion
Mar 29 at 19:12
1
if I dopython --versionI getPython 2.7.12returned and if I dopython3 --versionI getPython 3.5.2returned ,,, 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 manageraptand 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 usepython3withpythoncommand its safe to use this commandecho alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink/usr/bin/pythonat 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
 |Â
show 3 more comments
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!
add a comment |Â
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.
add a comment |Â
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!
add a comment |Â
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!
add a comment |Â
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!
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!
edited Mar 29 at 20:16
answered Mar 29 at 19:37
PerlDuck
3,92811030
3,92811030
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Mar 29 at 20:03
rulebreaker4
860413
860413
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
try
which pythonin terminal and see if it returns/usr/bin/pythonthen dowhich python3and see if it returns/usr/bin/python3.. if so .. they are both installed .. my system has both .. if I want python3 .. I runpython3command.â John Orion
Mar 29 at 19:12
1
if I do
python --versionI getPython 2.7.12returned and if I dopython3 --versionI getPython 3.5.2returned ,,, 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
aptand 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
python3withpythoncommand its safe to use this commandecho alias python=python3 >> ~/.bash && source ~/.bashrc. Just do it and don't remove or symlink/usr/bin/pythonat all!â Ali Razmdideh
Mar 29 at 19:31