How to Create Python Development Environment In Google Cloud Platform

Mayank Chourasia
3 min readJun 21, 2021

--

In this blog, I will discuss How to Create Python Development Environment In the Google Cloud Platform.

Creating and Connecting to a Virtual Machine

  • In the GCP Console go to Navigation Menu >Compute Engine> VM Instance.
  • Click on Create Instance
  • Configure the following settings:

Name: dev-instance

Region: us-central1 (Iowa)

Zone: us-central1-a

Machine configuration: N1

Identity and API: Select Allow full access to all Cloud APIs.

Firewall: Enable Allow HTTP traffic.

Leave the remaining settings as their defaults, and click Create.

1
2
  • On the VM instances page click on SSH.
  • It will launch a browser-hosted SSH session.

Installing software on the VM instance

  • In the SSH session, we have to update the Debian package list, copy-paste the command.
sudo apt-get update
  • Now install Git, copy-paste the command.
sudo apt-get install git

Enter y to continue because we are accepting the use of additional disk space.

  • Now install Python, copy-paste the command.
sudo apt-get install python3-setuptools python3-dev build-essential

Enter Y to continue because we are accepting the use of additional disk space.

  • Now install pip, copy-paste the command.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py

Configure the VM to Run Application Software

  • Now check python and pip versions.
python3 --versionpip3 --version
  • Clone the repository you want.

git clone https://github.com/mayankchourasia/GCP

  • server main.py{yourfilename}
  • Run the web server and check your output by clicking External IP of VM.
  • To stop server ctrl+C in ssh.

Conclusion

In the article, I give a view that how we can Set up a Python Development Environment.

Thanks for reading.

Stay tuned till the next blog

If you Want to Connect with Me:

Linkedin: https://www.linkedin.com/in/mayank-chourasia-38421a134/

Twitter: https://twitter.com/ChourasiaMayank.

Thank you stay safe, stay healthy.

Google Developers Google Cloud Google News Lab Get Python

--

--

Mayank Chourasia
Mayank Chourasia

Written by Mayank Chourasia

Hey, My name is Mayank Chourasia. Currently I am working on SAP Utilities as a SAP ABAP Developer. I had written a blogs on SAP ISU, SAP ABAP, Google Cloud .

No responses yet