- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我只是想在他们的教程页面上运行简单的 hello world 应用程序。我以前经常使用 Google App Engine,但现在我似乎根本无法使用它。我正在赢得 10 x64。下载了最新的google cloud sdk和python版本2.7.13
> ERROR 2017-01-07 15:25:21,219 wsgi.py:263] Traceback (most recent
> call last): File "C:\Program Files (x86)\Google\Cloud
> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py",
> line 240, in Handle
> handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "C:\Program Files (x86)\Google\Cloud
> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py",
> line 299, in _LoadHandler
> handler, path, err = LoadObject(self._handler) File "C:\Program Files (x86)\Google\Cloud
> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py",
> line 85, in LoadObject
> obj = __import__(path[0]) File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\main.py",
> line 18, in <module>
> from flask import Flask File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\flask\__init__.py",
> line 21, in <module>
> from .app import Flask, Request, Response File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\flask\app.py",
> line 27, in <module>
> from . import json, cli File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\flask\cli.py",
> line 17, in <module>
> import click File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\click\__init__.py",
> line 18, in <module> INFO 2017-01-07 10:25:21,229 module.py:806]
> default: "GET / HTTP/1.1" 500 -
> from .core import Context, BaseCommand, Command, MultiCommand, Group, \ File
> "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\click\core.py", line 8, in <module>
> from .types import convert_type, IntRange, BOOL File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\click\types.py",
> line 4, in <module>
> from ._compat import open_stream, text_type, filename_to_ui, \ File
> "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\click\_compat.py",
> line 536, in <module>
> from ._winconsole import _get_windows_console_stream File "C:\....\python-docs-samples\appengine\standard\flask\hello_world\lib\click\_winconsole.py",
> line 16, in <module>
> import ctypes File "C:\Python27\lib\ctypes\__init__.py", line 7, in <module>
> from _ctypes import Union, Structure, Array File "C:\Program Files (x86)\Google\Cloud
> SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py",
> line 964, in load_module
> raise ImportError('No module named %s' % fullname)
ImportError: No module named _ctypes
最佳答案
Google 的示例 Flask“Hello World”应用程序需要 Flask 0.11.1
。
此库不是由 Google 提供的,因此开发者需要通过 pip
This sample shows how to use Flask with Google App Engine Standard.
Before running or deploying this application, install the dependencies using pip:
pip install -t lib -r requirements.txt
Flask 的 setup.py
instructs pip
安装 click库,版本晚于或等于 2.0 版。
install_requires=[
'Werkzeug>=0.7',
'Jinja2>=2.4',
'itsdangerous>=0.21',
'click>=2.0',
],
2015 年 11 月 a change was committed 单击
以改进 Windows 控制台中对 unicode 的支持。此更改添加了 Appengine 阻塞的 ctypes
库的导入,因为 Appengine 沙箱不允许导入 ctypes
。
解决方法是用较早版本 (5.1 looks like the most recent candidate) 覆盖已安装的 click
:
pip install --target lib --upgrade click==5.1
关于google-app-engine - 导入错误 : No module named _ctypes running Python Flask tutorial for Google App Engine on Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41525223/
当我这样做时... import numpy as np ...我可以使用它但是... import pprint as pp ...不能,因为我需要这样做... from pprint import
我第一次尝试将 OpenCV 用于 Python 3。要安装,我只需在终端中输入“pip3 install opencv-python”。当我这样做时,我在 Finder(我在 Mac 上)中看到,在
如果有一个库我将使用至少两种方法,那么以下之间在性能或内存使用方面是否有任何差异? from X import method1, method2 和 import X 最佳答案 有区别,因为在 imp
我正在从 lodash 导入一些函数,我的同事告诉我,单独导入每个函数比将它们作为一个组导入更好。 当前方法: import {fn1, fn2, fn3} from 'lodash'; 首选方法:
之间有什么关系: import WSDL 中的元素 -和- import元素和在 XML Schema ...尤其是 location 之间的关系前者和 schemaLocation 的属性后者的属性
我在从 'theano.configdefaults' 导入 'local_bitwidth' 时遇到问题。并显示以下消息: ImportError
我注意到 React 可以这样导入: import * as React from 'react'; ...或者像这样: import React from 'react'; 第一个导入 react
对于当前的项目,我必须使用矩阵中提供的信息并对其进行数学计算,以及使用 ITK/VTK 函数来显示医疗信息/渲染。基本上我必须以(我猜)50/50 的方式同时使用 matlab 例程和 VTK/ITK
当我看到 pysqlite 的示例时,SQLite 库有两个用例。 from sqlite3 import dbapi2 as sqlite3 和 import sqlite3 为什么有两种方式支持s
我使用 Anaconda Python 发行版:Python 2.7 x64 和 Windows 7 SP1 x64 Ultimate。 当我import matplotlib.pyplot时,我得到
目录 【容器】镜像导出/导入 导出 导入 带标签 不带标签,后期修改 【仓库】镜像导出/导入
我正在寻找一种导入模块的方法,以便我可以从子文件夹 project/v0 和根文件夹 project 运行脚本。/p> 我在 python 3.6 中的文件结构(这就是没有初始化文件的原因) proj
我通常被告知以下是不好的做法。 from module import * 主要原因(或者有人告诉我)是,您可能会导入一些您不想要的东西,并且它可能会隐藏另一个模块中具有类似名称的函数或类。 但是,Py
我为 urllib (python3) 编写了一个小包装器。在if中导入模块是否正确且安全? if self.response_encoding == 'gzip': import gzip
我正在 pimcore 中创建一个新站点。有没有办法导出/导入 pimcore 站点的完整数据,以便我可以导出 xml/csv 格式的 pimcore 数据进行必要的更改,然后将其导入回来? 最佳答案
在 Node JS 中测试以下模块布局,看起来本地导出的定义总是在名称冲突的情况下替换外部导出的定义(参见 B.js 中的 f1)。 A.js export const f1 = 'A' B.js e
我在使用 VBA 代码时遇到了一些问题,该代码应该将 excel 数据导入我的 Access 数据库。当我运行代码时,我收到一个运行时错误“运行时错误 438 对象不支持此属性或方法”。来自我在其他论
我有一个名为 elements 的包,其中包含按钮、trifader、海报等内容。在 Button 类中,我正在执行 from elements import * 这执行正常,当我尝试 print(p
在我长期使用 python 的经验中,我遇到了一个非常奇怪的问题。 提前我想说我想知道为什么会发生这种情况 ,而不是如何更改我的代码或如何修复它,因为我也可以做到。 我正在使用 python2.7.3
我正在更新我的包。但是,我正在为依赖项/导入而苦苦挣扎。我使用了两个冲突的包 - ggplot2和 psych及其功能 alpha当然还有 alpha ggplot2 的对象不同于 alpha psy
我是一名优秀的程序员,十分优秀!