Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 没有名为appengine.ext的模块google app engine_Python_Google App Engine - Fatal编程技术网

Python 没有名为appengine.ext的模块google app engine

Python 没有名为appengine.ext的模块google app engine,python,google-app-engine,Python,Google App Engine,运行此命令时,我已经安装了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

运行此命令时,我已经安装了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
警告:root:找不到云SDK或应用引擎Python SDK。
如果遇到错误,请确保SDK二进制路径位于
PATH环境变量或ENDPOINTS_GAE_SDK变量指向
有效的SDK根目录。
回溯(最近一次呼叫最后一次):
文件“lib/endpoints/endpointscfg.py”,第26行,在
导入_endpointscfg_设置35; pylint:disable=未使用的导入
文件“/home/test/Documents/shipper dashboard/lib/endpoints/_endpointscfg_setup.py”,第107行,在
_设置路径()
文件“/home/test/Documents/shipper dashboard/lib/endpoints/_endpointscfg_setup.py”,第103行,在_setuppath中
来自google.appengine.ext导入供应商
ImportError:没有名为appengine.ext的模块

为了确保正确安装了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()()/

如果在运行
gcloud--version
时未显示“app engine python”,请按照以下说明安装,它正在运行
gcloud components Install app engine python
gcloud components Install app engine python extras

如果要更新云SDK,请运行
gcloud components update
,以确保您拥有最新版本


关于设置环境变量,也就是说,在Linux中,您应该运行这样的操作:
export ENDPOINTS\u GAE\u SDK=/path/to/appropiate/SDK

gcloud——版本工作正常,但当我运行此命令gcloud components update时,出现此错误,您无法执行此操作,因为此安装禁用了云SDK组件管理器。source~/.bashrc运行此程序后,它仍在工作,但仍会出现相同的错误。我已经了解到了这一点(),解决方案是删除gcloud SDK:
sudo apt purge autoremove google cloud SDK
,然后再次安装(),方法是下载正确的
.tar.gz
,将其解压缩到目录中,然后运行以下命令安装它:
sudo./googlecloudsdk/install.sh
。完成后,重新启动终端,然后运行
gcloud components update