Changing python version in silverblue, not possible?

i recently updated to fedora silverblue 33 beta.

but fedora 33 python symlink defaults to python3.9, i want to change that to python3.7.

without it i can’t even install google-cloud-sdk because it has some post install scripts that only works with python3.7.

1 Like

yea it was me who posted it.

the case there is different - it’s for f32 -> f33 upgrade, so google-cloud-sdk was already installed.

but for me, i want to install google-cloud-sdk on f33 so it’s post install script don’t work, meaning those scripts don’t seem to read that env (or am i doing something wrong?).
i tried adding that env in /etc/environment, /root/.bashrc but had no luck.

1 Like

I’ve run this from the Fedora 33 Beta Live session and it seems working:

sudo dnf install python3.7
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-312.0.0-linux-x86_64.tar.gz
tar -z -x -f google-cloud-sdk-312.0.0-linux-x86_64.tar.gz
tee -a ~/.bashrc << EOF
export CLOUDSDK_PYTHON=python3.7
EOF
. ~/.bashrc
google-cloud-sdk/install.sh
. ~/.bashrc
1 Like

I suggest that you install the Google Cloud SDK in a toolbox container so that you change / install any Python version at your leisure.

1 Like

thanks, seems like local binaries are the only way to go in silverblue.

I am already installing everything in .local, don’t know why I didn’t install gcloud locally too.

Thanks again!

1 Like

Yea toolbox is also another alternative but i keep toolbox for temporary app builds, so wouldn’t fit my workflow.

Also really curious though is alternatives tool useless in silverblue? And if it is, is there something specific for silverblue?

You can make multiple named toolboxes, see the toolbox create -c flag.

I’m this case you could also use the -i flag to use an older version of Fedora.

I use pyenv for this kind of stuff.

I came across the same problem of trying to get gcloud to work on Fedora 33 Silverblue and wanted to share my solution. Inside the google-cloud-sdk folder, I deleted the google-cloud-sdk/lib/third_party/enum folder, and that allowed me to get it working.