I'm trying to set up a basic Python development environment through GCP's Cloud Shell command line interface and I'm trying to activate a virtualenv to run some stuff in Dataflow. However I'm finding that I'm confused as to which directory the Cloud Shell is operating in.
My prompt shows the following:
my_name@cloudshell:~ (my-project-name)$
I installed virtualenv on my local machine in a prior session, and just now tried to activate a virtual environment through this previously installed activation file on my local machine with
source C:/Folder1/Folder2/virtualenv/Scripts/activate
but I kept getting "No such file or directory" even though this is the correct path. After some sleuthing, I found out that Cloud Shell is operating from the following directory by default:
/home/my_name/C:/Folder1/Folder2/virtualenv
(in which there's no 'Scripts' folder, which was causing the directory error)
This /home/my_name/...
prefix directory is nowhere to be found on my local machine. I'm realizing I have no idea what directory the Cloud Shell is working from.
I have a feeling that I've installed a lot of my environment files under this weird ghost directory (possibly inadvertently) and so now I've lost control over the structure of my development environment, because now I have virtualenv files on my local machine, and some other virtualenv files in this ghost directory.
Can somebody explain
1) Where this directory is located on my machine, if it's even there at all?
2) If I'm supposed to setup my entire environment from within this ghost directory?
3) If I just messed up my environment installation from the start and should start over?
Appreciate any help, thanks.
Google Cloud Shell (not to be confused with gcloud program) runs in a Virtual Machine in the Google Cloud. It knows nothing about your desktop. You are able to upload / download files from / to your desktop using the web browser that contains the UI for Cloud Shell.