运行此命令时,我已经安装了gcloud组件和其他软件包
python lib/endpoints/endpointscfg.py get_client_lib java -bs gradle src.service.endpoint_api.APIClass
然后它让我回国
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
答案 0 :(得分:0)
为了确保正确安装了gcloud SDk,可以运行:gcloud --version
,您应该会收到类似的信息
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
如果未识别该命令,请在使用Linux(Installing Google Cloud SDK)(Debian/Ubuntu)/ {{3}时,根据您的需要遵循有关Linux 7/CentOS 7的本教程} / Docker image。
如果在运行gcloud --version
时未显示'app-engine-python',请按照以下说明安装Windows or macOS,以汇总运行gcloud components install app-engine-python
和gcloud components install app-engine-python-extras
如果要更新Cloud SDK,请运行gcloud components update
,以确保您具有最新版本。
关于设置环境变量,即在Linux中,您应运行以下命令:export ENDPOINTS_GAE_SDK=/path/to/appropiate/SDK