DEV Community

Cover image for Make sure the python env is always running in cloud shell.
Akshay Rao
Akshay Rao

Posted on • Updated on

Make sure the python env is always running in cloud shell.

Introduction
Hi, I am Akshay Rao, recently working with python in AWS cloud shell every time, i had to activate the python env whenever open the cloud shell. This was annoying me, so found a solution.
Pre-requisites

AWS account

Let's start

  1. Login to the AWS account and open the cloud shell form the console. Image 1
  2. Create a python env in it. everytime i had to execute the source ~/.venv/bin/activate to activate the py env. Image 2
  3. Now we can put this command in the ~/.bashrc file and it will run this command when ever the cloud shell is opened. Image 3
  4. to test open new tab or just source the bashrc file. Image 4
  5. from now on we dont need to remember to activate the py env before working.

Thank you

Top comments (1)

Collapse
 
oc profile image
Xiaoli Wei

cool~ and just only used for AWS shell? another is working fine as well? thanks