google-cloud-sdk installation not finding right Python 2.7 version in CentOS /usr/local/bin

install gcloud
google cloud sdk python
install gcloud on mac
gcloud command not found
install gcloud cli
google cloud python
error cannot use bundled python installation to update cloud sdk in non interactive mode
cloudsdk_python

Our server OS is CentOS 6.8, I was trying to install google-cloud-sdk, even though I installed

python 2.7 in /usr/local/bin

, it is still looking at old version of

python 2.6 in /usr/bin

. I tried giving export PATH=/usr/local/bin:$PATH to first look at /usr/local/bin than /usr/bin but still the problem persists. please suggest a way to fix.

The way I have solved this (and I know it works) is to first install Python 2.7 in whatever way you'd like, then install pip using Python 2.7 which will give you pip2.7. You can then use pip2.7 to install the google_compute_engine module so that it ends up in the right modules folder.

# get pip2.7
wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py

# install the gcloud module
pip2.7 install google_compute_engine

You can then add this to your $HOME/.bashrc

export CLOUDSDK_PYTHON=/usr/local/bin/python2.7

This is the best repeatable way I know of

Installing Google Cloud SDK, Python Version: [2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 Installation Properties: [/usr/local/bin/google-cloud-sdk/properties] OS : Centos 7 Although i installed google cloud sdk in /usr/local , why is the User  This tutorial shows you the various steps to successfully install the Google Cloud SDK for App Engine using Python 2.7 in Ubuntu 14.04. 1. First make sure whether you have Python 2.7 installed or not. Open your terminals and enter the following command: $ python -V You should similar output as this: Python 2.7.6. 2.

Go to the google-cloud-sdk folder and open the install.sh file. Change the CLOUDSDK_PYTHON="python" value to CLOUDSDK_PYTHON="python2.7"

Rerun the install with the command:

./install.sh

Or you could install it using yum: https://cloud.google.com/sdk/downloads#yum

Setting up a Python development environment, Hi, I am trying to install google cloud on a server as an ordinary user. 4.4.7-18 x86_64) installed and the default python version on the server is python2.6. However, when I check the environment variable, I see python 2.7: Run echo $​SHELL and make sure it prints /bin/bash and not some other shell  Hi, I am trying to install google cloud on a server as an ordinary user. The server has linux (Red Hat 4.4.7-18 x86_64) installed and the default python version on the server is python2.6.

If you are on Windows This is a simple solution that worked for me: open Powershell as administrator and run this to add your Python folder to your environment's PATH: $env:Path += ";C:\python27_x64\"

Then re-run the command that gave you the original error. It should work fine.

Alternatively you could run that original (error-causing) command within the Cloud SDK Shell. That also worked for me.

Could not find Python executable · Issue #402 , If you are running on Windows, get the latest version of Python 2.7 here. on the command line (you can have the installer do it for you if you select the correct option). If Python is not installed, you can likely install it using your distribution's package C:\\Users\\\<user\>\\AppData\\Local\\GitHub\\PortableGit\_\<guid\>\\bin​  So sudo doesn't use the /usr/local/bin path. You can solve your problem in a couple ways: Add /usr/local/bin to the secure_path - This can open up security problems if you don't know what's gonna be in your /usr/local/bin directory. Though typically, this is probably not a huge concern because only root has write access to /usr/local/bin by

google-cloud-sdk installation error · Issue #3908 · googleapis , 12 Nov 2018 How to install Google cloud platform(GCP) sdk – gcloud cli tool. Platform Previously, we saw how Ubuntu Desktop could be set up locally May Not Have Noticed First, locate your user account's configuration files. sh file and save. Oct 22, 2018 · Install gcloud SDK on Linux First, make sure that Python 2. I don't know what's the deal but I am stuck following some stackoverflow solutions which gets nowhere. Can you please help me on this? Monas-MacBook-Pro:CS764 mona$ sudo python get-pip.py The

Getting Started, In this Python installation guide you'll see step by step how to get a working Python 3 openSUSE; CentOS; Fedora; Arch Linux; Compiling Python From Source You can determine your local Ubuntu version by running the following command: Since you're installing Python into /usr/bin , you'll need to run as root​:. Note: Cloud SDK uses Python 2 by default, but will soon move to Python 3 (run gcloud topic startup for exclusions and more information on configuring your Python interpreter to use a different version). Consider upgrading to Python 3 to avoid disruption in the future.

Install gcloud ubuntu, Before you begin You must use a kubectl version that is within one For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. kubectl /usr​/local/bin/kubectl You can install kubectl as part of the Google Cloud SDK. In order for kubectl to find and access a Kubernetes cluster, it needs a  While Cloud SDK currently uses Python 2 by default, you can use an existing Python installation if necessary by unchecking the option to 'Install Bundled Python'. . Note: Cloud SDK uses Python 2 by default, but will soon move to Python 3 (run gcloud topic startup for exclusions and more information on configuring your Python interpreter to use

Comments
  • I am stuck to same problem and I just found this line in Google cloud SDK docs The Cloud SDK RPM packages are supported for Red Hat Enterprise Level 7 and CentOS 7., so I think CentOS upgrade to version 7 or more is safer option for this problem.
  • there isn't such a CLOUDSDK_PYTHON="python" inside the install.sh file, since a long time ago.