I'm just getting started in the Google Cloud Console. I've created a VM (Red Hat Enterprise Linux 7). Python 2.7 comes preinstalled. How do I update to Python 3? Also 'pip install' doesn't work; I'm assuming that will come with Python 3 once I get that updated.
Asked
Active
Viewed 6,585 times
2
-
You can setup pip yourself by following this instruction https://packaging.python.org/installing/#install-pip-setuptools-and-wheel Or a simple google search to install python3 on RHEL7. – Guagua Jun 07 '17 at 19:01
1 Answers
0
RHEL 7 running on GCE VM is mostly identical to RHEL 7 running on your own physical server.
One thing to be aware is that by default on GCE Vms, passwordless sudo is enabled with the default account you ssh into the VM.
Once you ssh into the VM (either from the browser or using gcloud compute ssh
), you can follow these steps:
# Install Python 3.4
sudo yum -y install python34
# Install python-setuptools which will bring in easy_install
sudo yum -y install python34-setuptools
# Install pip using easy_install
sudo easy_install-3.4 pip

Tuxdude
- 47,485
- 15
- 109
- 110