One day ago I did a fresh installation of Raspberry Pi OS Buster and after that I installed Python3.8 in my Raspberry pi following this tutorial. https://installvirtual.com/how-to-install-python-3-8-on-raspberry-pi-raspbian/
I added python alias to bashrc.
echo "alias python=/usr/local/bin/python3.8" >> ~/.bashrc
source ~/.bashrc
Now typing python
in terminal showing Python 3.8.0 (default, Jun 8 2020, 13:17:16)
But when I run python3 it's showing Python Python 3.7.3
I added python3 alias pointing to python3.8 follwing above commands but still no luck. Programs from Geany still showing 3.7. I changed Geany's bulid commands to python(as I set default python to 3.8)
#!/usr/local/bin/python3.8
import sys
print("Python version")
print (sys.version)
Python version 3.7.3 (default, Dec 20 2019, 18:57:59)
I have two questions:
How to run programs in Python3.8?
Can I uninstall python3.7?
alias python3
). It should display a message saying alias python3=/usr/local/bin/python3.8. Then verify the version by doing apython3 --version
. Having said this, I must add that you have a someone unusual way to edit your.bashrc
. Of course you can do it in that way, but there exist programs called text editors, and it is much easier to edit files with them, instead of using commands from the shell....python3='/usr/local/bin/python3.8'
. python3 --version showingPython 3.8.0.
Actually I usednano
to edit.bashrc