- bash: datalab: command not found

I installed the cloud datalab component by running gcloud components install datalab

However, I keep getting the following error from my terminal when trying to create a datalab instance:
-bash: datalab: command not found

enter image description here

When I ran gcloud components list

, I realized that I installed correctly datalab

as shown in the image below: enter image description here

Any idea what could be wrong?

+3


source to share


2 answers


Based on the output, gcloud components list

you have already installed the command line tool datalab

. The binary must be present at this location:$GOGOLE_CLOUD_SDK_INSTALL_DIR/bin/datalab

If launching just datalab

still doesn't call that binary, then you don't have the Cloud SDK bin directory in your environment variable $PATH

.

To confirm this theory, check if you can run datalab

by specifying the full path.



Example (if your Cloud SDK is installed on ~/google-cloud-sdk

):

~/google-cloud-sdk/bin/datalab

      

+1


source


I faced the same problem and I managed to fix this issue by reinstalling Google Cloud SDK after this command and try again.

Be sure to remove the original gcloud command before reinstalling as it might be installed in a different path.

I am using Debian and the gcloud command was originally in / usr / local / bin / gcloud which had this problem. (I don't remember how I installed the command.) When I followed the instruction , it was installed in / usr / bin / gcloud and it worked fine, although it instructed me to run:



$ sudo apt-get install google-cloud-sdk-datalab

      

instead:

$ gcloud components install datalab

      

0


source







All Articles