Reputation:
I am using google colab which is connected with google cloud in a linux server.
When I am using google colab with google cloud by runing the following code
import sys
print(sys.version)
the output is '2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0]'
However, when I am connected with google cloud, the output is '3.7.11 (default, Jul 3 2021, 18:01:19) [GCC 7.5.0]'
So I want to upgrate it into python 3.7 and I don't know how.
I run the following code, but I still have the same problem
apt update
sudo apt install python3-pip
alias pip='pip3'
I checked also these sites https://cloud.google.com/python/docs/setup#linux_2, How do I install Python 3.7 in google cloud shell but didn't solve my problem.
Actually, I can see that there is python 3.7 in the server, but it uses the python 2.7, how can I change it to 3.7?
I would be grateful if you could help me!
Upvotes: 0
Views: 172
Reputation:
So actually the answer of my question comes from this post How to completely uninstall python 2.7.13 on Ubuntu 16.04.
Everyone who have a similar problem the first thing that he/she should do is to unistall python 2.7.
Upvotes: 1