Updating the google cloud SDK itself and/or installing/updating SDK components requires write permissions across the installation directory, so these operations need to be executed under the same userid as the initial SDK installation (not necessarily root/sudo).
Updates performed using gcloud component commands only have the above requirement. In addition updates using your system's package manager require sudo because only the superuser can make system changes using the package manager.
Your SDK was installed with sudo permissions (sudo apt-get update && sudo apt-get install google-cloud-sdk in the recipe you referenced), so you have to also use sudo when installing/updating SDK components.
You have 2 options:
install the google-cloud-sdk-app-engine-python package. IMHO this has higher chances of success, especially if there were any ubuntu-specific customisations in the SDK. It also keeps you ubuntu package installation "sane", in the sense the information provided by the package manager would match what's actually installed in the SDK. There is a disadvantage though: you'd be relying on the ubuntu package upgrades to become available to upgrade your SDK and/or its components, which might be inconvenient if you need such upgrades fast.
you could perform the SDK components installation/upgrades via gcloud commands. But these would be totally unknown to the ubuntu package management. And you might run into trouble if there are ubuntu-specific customisations as they would not be known to the SDK itself.
There is a 3rd option, maybe a bit more tedious, which is what I chose (I'm running opensuse). You can download and install the generic linux version of the SDK, which is standalone in the sense that it has no relationship with the package manager (so you don't actually need sudo, the SDK can be installed as a regular user). You can find various SDK versions here (regular tar.gz archives).
I prefer this 3rd approach because the installation is contained to a directory so I can have multiple versions of the SDK installed simultaneously and easily switch between them just by manipulating symlinks. In this case installing/updating components would apply to whichever SDK installation is the "current" one. I was even able to keep my installations functional across complete OS re-installs (the SDKs were on a separate partition than the OS).
apt-getinstalls in standard Python.tar.gz. After uncompressing you runinstall.sh. In this bahs script I found that it checks system's variableCLOUDSDK_PYTHONfor path to Python which it should use to install it. Maybe if you set path to conda in your environment then it will install in expected environment. Maybe it will works even when you install withapt-get