Upgrade default Python 3.5.3 to Python 3.7.2 on Raspberry Pi 3 Stretch Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Upgrading Node.js to latest versionupgrading default python version or install another python version in LinuxHow to install python 3 and setuptools on raspberry pi?Error: “ 'dict' object has no attribute 'iteritems' ”pyenv failing to install package for python 3.5.3How to use Homebrew to upgrade to a specific Python version?python 3.7 import smbus ModuleNotFoundError no module named 'smbus'Python 3.7 import gpiozero ModuleNotFoundError No module named 'gpiozero' on raspberry pi zeroPython dev headers for non-default python installationHow to install tensorflow in raspberry pi with python 3.5.3

Are these square matrices always diagonalisable?

Married in secret, can marital status in passport be changed at a later date?

Would reducing the reference voltage of an ADC have any effect on accuracy?

Why did C use the -> operator instead of reusing the . operator?

A Paper Record is What I Hamper

What *exactly* is electrical current, voltage, and resistance?

How to keep bees out of canned beverages?

Identify story/novel: Tribe on colonized planet, not aware of this. "Taboo," altitude sickness, robot guardian (60s? Young Adult?)

Visa-free travel to the US using refugee travel document from Spain?

Why did Israel vote against lifting the American embargo on Cuba?

std::is_constructible on incomplete types

Raising a bilingual kid. When should we introduce the majority language?

Is Electric Central Heating worth it if using Solar Panels?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

Justification for leaving new position after a short time

Check if a string is entirely made of the same substring

What is the term for a person whose job is to place products on shelves in stores?

As an international instructor, should I openly talk about my accent?

How to open locks without disable device?

Does Feeblemind produce an ongoing magical effect that can be dispelled?

Will I lose my paid in full property

Additive group of local rings

Mistake in years of experience in resume?

Retract an already submitted recommendation letter (written for an undergrad student)



Upgrade default Python 3.5.3 to Python 3.7.2 on Raspberry Pi 3 Stretch



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Upgrading Node.js to latest versionupgrading default python version or install another python version in LinuxHow to install python 3 and setuptools on raspberry pi?Error: “ 'dict' object has no attribute 'iteritems' ”pyenv failing to install package for python 3.5.3How to use Homebrew to upgrade to a specific Python version?python 3.7 import smbus ModuleNotFoundError no module named 'smbus'Python 3.7 import gpiozero ModuleNotFoundError No module named 'gpiozero' on raspberry pi zeroPython dev headers for non-default python installationHow to install tensorflow in raspberry pi with python 3.5.3



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1
















Hello, I'm Anant Narayan. I'm 10 years old. I want to upgrade the
default Python3 which is Python 3.5.3 to Python 3.7.2. When googled I found many sites telling how to install latest
python 3.5 and other versions including python 3.7.0 but none of these
sites were telling how to upgrade from python 3.5.3 to python 3.7.2
.So I tried to install Python 3.7.2 instead of upgrading the default
Python 3.5.3. After some searches I got a guide on How to install Python 3.7 on Raspberry Pi.Here is the link to the website: https://www.ramoonus.nl/2018/06/30/installing-python-3-7-on-raspberry-pi/ . So I followed the steps and successfully installed Python 3.7.0 on my Raspberry Pi 3 and set the alias of python and python3 to python3.7.0 and now when I enter python --version or python3 --version it gives me 3.7.0. But now I have another problem that is when I shutdown or reboot my Pi and switches it back on and I type python --version it gives me 2.7.13 and python3 it gives me 3.5.3. So please help me with this matter. Thanks in advance.











share|improve this question
























  • does python3.7 still exist on your system after a reboot, under /usr/local/opt/ as per the ref link?

    – gavin
    Mar 9 at 6:22











  • Yes the folder is still there after reboot.

    – Anant Narayan
    Mar 9 at 6:32











  • just adding an alias would work at this step, similar to what @Deep has mentioned in his answer

    – gavin
    Mar 9 at 6:38

















1
















Hello, I'm Anant Narayan. I'm 10 years old. I want to upgrade the
default Python3 which is Python 3.5.3 to Python 3.7.2. When googled I found many sites telling how to install latest
python 3.5 and other versions including python 3.7.0 but none of these
sites were telling how to upgrade from python 3.5.3 to python 3.7.2
.So I tried to install Python 3.7.2 instead of upgrading the default
Python 3.5.3. After some searches I got a guide on How to install Python 3.7 on Raspberry Pi.Here is the link to the website: https://www.ramoonus.nl/2018/06/30/installing-python-3-7-on-raspberry-pi/ . So I followed the steps and successfully installed Python 3.7.0 on my Raspberry Pi 3 and set the alias of python and python3 to python3.7.0 and now when I enter python --version or python3 --version it gives me 3.7.0. But now I have another problem that is when I shutdown or reboot my Pi and switches it back on and I type python --version it gives me 2.7.13 and python3 it gives me 3.5.3. So please help me with this matter. Thanks in advance.











share|improve this question
























  • does python3.7 still exist on your system after a reboot, under /usr/local/opt/ as per the ref link?

    – gavin
    Mar 9 at 6:22











  • Yes the folder is still there after reboot.

    – Anant Narayan
    Mar 9 at 6:32











  • just adding an alias would work at this step, similar to what @Deep has mentioned in his answer

    – gavin
    Mar 9 at 6:38













1












1








1









Hello, I'm Anant Narayan. I'm 10 years old. I want to upgrade the
default Python3 which is Python 3.5.3 to Python 3.7.2. When googled I found many sites telling how to install latest
python 3.5 and other versions including python 3.7.0 but none of these
sites were telling how to upgrade from python 3.5.3 to python 3.7.2
.So I tried to install Python 3.7.2 instead of upgrading the default
Python 3.5.3. After some searches I got a guide on How to install Python 3.7 on Raspberry Pi.Here is the link to the website: https://www.ramoonus.nl/2018/06/30/installing-python-3-7-on-raspberry-pi/ . So I followed the steps and successfully installed Python 3.7.0 on my Raspberry Pi 3 and set the alias of python and python3 to python3.7.0 and now when I enter python --version or python3 --version it gives me 3.7.0. But now I have another problem that is when I shutdown or reboot my Pi and switches it back on and I type python --version it gives me 2.7.13 and python3 it gives me 3.5.3. So please help me with this matter. Thanks in advance.











share|improve this question

















Hello, I'm Anant Narayan. I'm 10 years old. I want to upgrade the
default Python3 which is Python 3.5.3 to Python 3.7.2. When googled I found many sites telling how to install latest
python 3.5 and other versions including python 3.7.0 but none of these
sites were telling how to upgrade from python 3.5.3 to python 3.7.2
.So I tried to install Python 3.7.2 instead of upgrading the default
Python 3.5.3. After some searches I got a guide on How to install Python 3.7 on Raspberry Pi.Here is the link to the website: https://www.ramoonus.nl/2018/06/30/installing-python-3-7-on-raspberry-pi/ . So I followed the steps and successfully installed Python 3.7.0 on my Raspberry Pi 3 and set the alias of python and python3 to python3.7.0 and now when I enter python --version or python3 --version it gives me 3.7.0. But now I have another problem that is when I shutdown or reboot my Pi and switches it back on and I type python --version it gives me 2.7.13 and python3 it gives me 3.5.3. So please help me with this matter. Thanks in advance.








python python-3.x raspberry-pi upgrade






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 9 at 6:27







Anant Narayan

















asked Mar 9 at 6:14









Anant NarayanAnant Narayan

115




115












  • does python3.7 still exist on your system after a reboot, under /usr/local/opt/ as per the ref link?

    – gavin
    Mar 9 at 6:22











  • Yes the folder is still there after reboot.

    – Anant Narayan
    Mar 9 at 6:32











  • just adding an alias would work at this step, similar to what @Deep has mentioned in his answer

    – gavin
    Mar 9 at 6:38

















  • does python3.7 still exist on your system after a reboot, under /usr/local/opt/ as per the ref link?

    – gavin
    Mar 9 at 6:22











  • Yes the folder is still there after reboot.

    – Anant Narayan
    Mar 9 at 6:32











  • just adding an alias would work at this step, similar to what @Deep has mentioned in his answer

    – gavin
    Mar 9 at 6:38
















does python3.7 still exist on your system after a reboot, under /usr/local/opt/ as per the ref link?

– gavin
Mar 9 at 6:22





does python3.7 still exist on your system after a reboot, under /usr/local/opt/ as per the ref link?

– gavin
Mar 9 at 6:22













Yes the folder is still there after reboot.

– Anant Narayan
Mar 9 at 6:32





Yes the folder is still there after reboot.

– Anant Narayan
Mar 9 at 6:32













just adding an alias would work at this step, similar to what @Deep has mentioned in his answer

– gavin
Mar 9 at 6:38





just adding an alias would work at this step, similar to what @Deep has mentioned in his answer

– gavin
Mar 9 at 6:38












2 Answers
2






active

oldest

votes


















0














Great that you are having fun with your PI! I hope I can help you, please leave a comment if you have more questions.



In Linux, an alias is a setting in your shell, the program that you talk with to control your PI. But as soon as you leave your PI, the shell program is closed and the alias setting is thrown away.



To make the change permanent, you can either add the alias setting to the startup file of your shell (the file .profile in your home directory), or better, change the links.



To change .profile, type the following exactly (better to use copy-paste):



echo "alias python3=/usr/local/bin/python3.7" >> ~/.profile


The file .profile is read during login, so to activate the change you must log out and log in again.



In Unix, a link is a file that points to another file. /usr/bin/python normally points to /usr/bin/python2.7, and /usr/bin/python3 points to /usr/bin/python3.5.3. You can see links by adding the -l (l for long) option to ls, for example ls -l /usr/bin/python*. Links have permissions set to lrwxrwxrwx.



I would leave the /usr/bin/python link alone, this is used by the operating system and that expects certain libraries to be installed that are probably not installed in your new python.



If your new python is /usr/local/opt/python-3.7.2/bin/python3.7, you can change the python3 link by typing the following commands:



sudo rm /usr/bin/python3
sudo ln -s /usr/local/bin/python3.7 /usr/bin/python3





share|improve this answer

























  • I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

    – Anant Narayan
    Mar 9 at 17:35











  • Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

    – EvertW
    Mar 11 at 8:24











  • Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

    – EvertW
    Mar 11 at 10:14












  • Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

    – Anant Narayan
    Mar 11 at 16:55












  • My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

    – EvertW
    Mar 12 at 9:17


















0














 wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

tar xzvf Python-3.7.2.tgz

cd Python-3.7.2/

./configure

make -j4

sudo make install


After that simply do:



echo "alias python3=’/usr/local/opt/python-3.7.2/bin/python3.7′" >> ~/.profile


Hope this work






share|improve this answer

























  • Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

    – snakecharmerb
    Mar 10 at 9:22












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074581%2fupgrade-default-python-3-5-3-to-python-3-7-2-on-raspberry-pi-3-stretch%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Great that you are having fun with your PI! I hope I can help you, please leave a comment if you have more questions.



In Linux, an alias is a setting in your shell, the program that you talk with to control your PI. But as soon as you leave your PI, the shell program is closed and the alias setting is thrown away.



To make the change permanent, you can either add the alias setting to the startup file of your shell (the file .profile in your home directory), or better, change the links.



To change .profile, type the following exactly (better to use copy-paste):



echo "alias python3=/usr/local/bin/python3.7" >> ~/.profile


The file .profile is read during login, so to activate the change you must log out and log in again.



In Unix, a link is a file that points to another file. /usr/bin/python normally points to /usr/bin/python2.7, and /usr/bin/python3 points to /usr/bin/python3.5.3. You can see links by adding the -l (l for long) option to ls, for example ls -l /usr/bin/python*. Links have permissions set to lrwxrwxrwx.



I would leave the /usr/bin/python link alone, this is used by the operating system and that expects certain libraries to be installed that are probably not installed in your new python.



If your new python is /usr/local/opt/python-3.7.2/bin/python3.7, you can change the python3 link by typing the following commands:



sudo rm /usr/bin/python3
sudo ln -s /usr/local/bin/python3.7 /usr/bin/python3





share|improve this answer

























  • I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

    – Anant Narayan
    Mar 9 at 17:35











  • Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

    – EvertW
    Mar 11 at 8:24











  • Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

    – EvertW
    Mar 11 at 10:14












  • Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

    – Anant Narayan
    Mar 11 at 16:55












  • My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

    – EvertW
    Mar 12 at 9:17















0














Great that you are having fun with your PI! I hope I can help you, please leave a comment if you have more questions.



In Linux, an alias is a setting in your shell, the program that you talk with to control your PI. But as soon as you leave your PI, the shell program is closed and the alias setting is thrown away.



To make the change permanent, you can either add the alias setting to the startup file of your shell (the file .profile in your home directory), or better, change the links.



To change .profile, type the following exactly (better to use copy-paste):



echo "alias python3=/usr/local/bin/python3.7" >> ~/.profile


The file .profile is read during login, so to activate the change you must log out and log in again.



In Unix, a link is a file that points to another file. /usr/bin/python normally points to /usr/bin/python2.7, and /usr/bin/python3 points to /usr/bin/python3.5.3. You can see links by adding the -l (l for long) option to ls, for example ls -l /usr/bin/python*. Links have permissions set to lrwxrwxrwx.



I would leave the /usr/bin/python link alone, this is used by the operating system and that expects certain libraries to be installed that are probably not installed in your new python.



If your new python is /usr/local/opt/python-3.7.2/bin/python3.7, you can change the python3 link by typing the following commands:



sudo rm /usr/bin/python3
sudo ln -s /usr/local/bin/python3.7 /usr/bin/python3





share|improve this answer

























  • I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

    – Anant Narayan
    Mar 9 at 17:35











  • Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

    – EvertW
    Mar 11 at 8:24











  • Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

    – EvertW
    Mar 11 at 10:14












  • Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

    – Anant Narayan
    Mar 11 at 16:55












  • My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

    – EvertW
    Mar 12 at 9:17













0












0








0







Great that you are having fun with your PI! I hope I can help you, please leave a comment if you have more questions.



In Linux, an alias is a setting in your shell, the program that you talk with to control your PI. But as soon as you leave your PI, the shell program is closed and the alias setting is thrown away.



To make the change permanent, you can either add the alias setting to the startup file of your shell (the file .profile in your home directory), or better, change the links.



To change .profile, type the following exactly (better to use copy-paste):



echo "alias python3=/usr/local/bin/python3.7" >> ~/.profile


The file .profile is read during login, so to activate the change you must log out and log in again.



In Unix, a link is a file that points to another file. /usr/bin/python normally points to /usr/bin/python2.7, and /usr/bin/python3 points to /usr/bin/python3.5.3. You can see links by adding the -l (l for long) option to ls, for example ls -l /usr/bin/python*. Links have permissions set to lrwxrwxrwx.



I would leave the /usr/bin/python link alone, this is used by the operating system and that expects certain libraries to be installed that are probably not installed in your new python.



If your new python is /usr/local/opt/python-3.7.2/bin/python3.7, you can change the python3 link by typing the following commands:



sudo rm /usr/bin/python3
sudo ln -s /usr/local/bin/python3.7 /usr/bin/python3





share|improve this answer















Great that you are having fun with your PI! I hope I can help you, please leave a comment if you have more questions.



In Linux, an alias is a setting in your shell, the program that you talk with to control your PI. But as soon as you leave your PI, the shell program is closed and the alias setting is thrown away.



To make the change permanent, you can either add the alias setting to the startup file of your shell (the file .profile in your home directory), or better, change the links.



To change .profile, type the following exactly (better to use copy-paste):



echo "alias python3=/usr/local/bin/python3.7" >> ~/.profile


The file .profile is read during login, so to activate the change you must log out and log in again.



In Unix, a link is a file that points to another file. /usr/bin/python normally points to /usr/bin/python2.7, and /usr/bin/python3 points to /usr/bin/python3.5.3. You can see links by adding the -l (l for long) option to ls, for example ls -l /usr/bin/python*. Links have permissions set to lrwxrwxrwx.



I would leave the /usr/bin/python link alone, this is used by the operating system and that expects certain libraries to be installed that are probably not installed in your new python.



If your new python is /usr/local/opt/python-3.7.2/bin/python3.7, you can change the python3 link by typing the following commands:



sudo rm /usr/bin/python3
sudo ln -s /usr/local/bin/python3.7 /usr/bin/python3






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 11 at 10:05

























answered Mar 9 at 7:53









EvertWEvertW

701516




701516












  • I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

    – Anant Narayan
    Mar 9 at 17:35











  • Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

    – EvertW
    Mar 11 at 8:24











  • Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

    – EvertW
    Mar 11 at 10:14












  • Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

    – Anant Narayan
    Mar 11 at 16:55












  • My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

    – EvertW
    Mar 12 at 9:17

















  • I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

    – Anant Narayan
    Mar 9 at 17:35











  • Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

    – EvertW
    Mar 11 at 8:24











  • Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

    – EvertW
    Mar 11 at 10:14












  • Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

    – Anant Narayan
    Mar 11 at 16:55












  • My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

    – EvertW
    Mar 12 at 9:17
















I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

– Anant Narayan
Mar 9 at 17:35





I tried to install python 3.7.2 with Deep's instructions and copy-pasted the line in the .profile, logged out and logged in again and when I type python3, it gives me the following error : -bash: /usr/bin/python3: No such file or directory . I would like to know if there is a setup wizard for installing Python 3.7.2 on Linux just like the setup wizard for installing Python on Windows. Thanks.

– Anant Narayan
Mar 9 at 17:35













Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

– EvertW
Mar 11 at 8:24





Wizards? Nah, this situation is not covered by wizards. Wizards only help with situations they foresaw. You are almost done, only the alias in the .profile points to the wrong file. My bad, probably. I'll install P3.7.2 on my own Pi, see where the python3.7 file lives.

– EvertW
Mar 11 at 8:24













Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

– EvertW
Mar 11 at 10:14






Anant, by following the instructions of Deep I got a Python that lives in /usr/local/bin/python3.7, I edited my instructions accordingly. You can test whether this is the same for you by simply running /usr/local/bin/python3.7. If that gets you into python3.7.2, you're OK to just repeat the instructions. The extra line in .profile does not matter. You might want to open the file in e.g. gedit and remove it for extra thoroughness points ;-)

– EvertW
Mar 11 at 10:14














Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

– Anant Narayan
Mar 11 at 16:55






Thank you Evert, I followed instructions given by you and now my default Python 3 is Python 3.7.2 . Thanks Everyone.Special thanks to Evert:-)

– Anant Narayan
Mar 11 at 16:55














My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

– EvertW
Mar 12 at 9:17





My Pleasure, Anant! I hope you will get just as hooked to programming as me 40 years ago ;-) It is a great way to make a living!

– EvertW
Mar 12 at 9:17













0














 wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

tar xzvf Python-3.7.2.tgz

cd Python-3.7.2/

./configure

make -j4

sudo make install


After that simply do:



echo "alias python3=’/usr/local/opt/python-3.7.2/bin/python3.7′" >> ~/.profile


Hope this work






share|improve this answer

























  • Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

    – snakecharmerb
    Mar 10 at 9:22
















0














 wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

tar xzvf Python-3.7.2.tgz

cd Python-3.7.2/

./configure

make -j4

sudo make install


After that simply do:



echo "alias python3=’/usr/local/opt/python-3.7.2/bin/python3.7′" >> ~/.profile


Hope this work






share|improve this answer

























  • Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

    – snakecharmerb
    Mar 10 at 9:22














0












0








0







 wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

tar xzvf Python-3.7.2.tgz

cd Python-3.7.2/

./configure

make -j4

sudo make install


After that simply do:



echo "alias python3=’/usr/local/opt/python-3.7.2/bin/python3.7′" >> ~/.profile


Hope this work






share|improve this answer















 wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz

tar xzvf Python-3.7.2.tgz

cd Python-3.7.2/

./configure

make -j4

sudo make install


After that simply do:



echo "alias python3=’/usr/local/opt/python-3.7.2/bin/python3.7′" >> ~/.profile


Hope this work







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 9 at 18:26

























answered Mar 9 at 6:35









DeepDeep

63




63












  • Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

    – snakecharmerb
    Mar 10 at 9:22


















  • Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

    – snakecharmerb
    Mar 10 at 9:22

















Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

– snakecharmerb
Mar 10 at 9:22






Do make altinstall, otherwise you will overwrite the system Python, which you almost never want to do. docs.python.org/3/using/unix.html#building-python

– snakecharmerb
Mar 10 at 9:22


















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074581%2fupgrade-default-python-3-5-3-to-python-3-7-2-on-raspberry-pi-3-stretch%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved