Reputation: 359
I have installed the gcloud components and other packages. But when I ran this command:
python lib/endpoints/endpointscfg.py get_client_lib java -bs gradle src.service.endpoint_api.APIClass
It fails with:
WARNING:root:Could not find either the Cloud SDK or the App Engine Python SDK.
If you encounter errors, please make sure that the SDK binary path is in your
PATH environment variable or that the ENDPOINTS_GAE_SDK variable points to a
valid SDK root.
Traceback (most recent call last):
File "lib/endpoints/endpointscfg.py", line 26, in <module>
import _endpointscfg_setup # pylint: disable=unused-import
File "/home/test/Documents/shipper-dashboard/lib/endpoints/_endpointscfg_setup.py", line 107, in <module>
_SetupPaths()
File "/home/test/Documents/shipper-dashboard/lib/endpoints/_endpointscfg_setup.py", line 103, in _SetupPaths
from google.appengine.ext import vendor
ImportError: No module named appengine.ext
Upvotes: 0
Views: 226
Reputation: 1524
In order to ensure you have correctly installed the gcloud SDk, you can run:
gcloud --version
and you should receive something like this
Google Cloud SDK 272.0.0
alpha 2019.05.17
app-engine-go
app-engine-java 1.9.77
app-engine-php " "
app-engine-python 1.9.87
app-engine-python-extras 1.9.87
beta 2019.05.17
bq 2.0.50
cbt
cloud-build-local
cloud-datastore-emulator 2.1.0
cloud_sql_proxy
core 2019.11.16
datalab 20190610
docker-credential-gcr
gsutil 4.46
kubectl 2019.11.04
pubsub-emulator 2019.09.27
In case that command is not recognized, please follow this tutorial about Installing Google Cloud SDK according to your needs, if you are using linux (Debian/Ubuntu)(Linux 7/CentOS 7) / Docker image / Windows or macOS.
If 'app-engine-python' is not shown when running gcloud --version
, please follow this instructions to install the CloudSDK for Pyhton.
In summary, run
gcloud components install app-engine-python
and
gcloud components install app-engine-python-extras
If you want to update the Cloud SDK, please run the following command to ensure you have the latest versions:
gcloud components update
About setting the env var, i.e. in Linux you should run something like this:
export ENDPOINTS_GAE_SDK=/path/to/appropiate/SDK
Upvotes: 1