Python 运行google应用程序引擎时出错:无法识别的参数:管理控制台服务器

Python 运行google应用程序引擎时出错:无法识别的参数:管理控制台服务器,python,google-app-engine,python-2.7,ubuntu-12.04,Python,Google App Engine,Python 2.7,Ubuntu 12.04,我正在学习“Python应用程序引擎入门”教程,但似乎无法连接到开发服务器。当我尝试运行日志控制台时,我不断从日志控制台中得到以下错误 2013-08-23 09:46:43 PM Running command: "[u'/usr/bin/python', '/home/mathee/google_appengine/dev_appserver.py', '--admin_console_server=', '--port=8080', '/home/mathee/app']" usage:

我正在学习“Python应用程序引擎入门”教程,但似乎无法连接到开发服务器。当我尝试运行日志控制台时,我不断从日志控制台中得到以下错误

2013-08-23 09:46:43 PM Running command: "[u'/usr/bin/python', '/home/mathee/google_appengine/dev_appserver.py', '--admin_console_server=', '--port=8080', '/home/mathee/app']"
usage: dev_appserver.py [-h] [--host HOST] [--port PORT]
                    [--admin_host ADMIN_HOST] [--admin_port ADMIN_PORT]
                    [--auth_domain AUTH_DOMAIN] [--storage_path PATH]
                    [--log_level {debug,info,warning,critical,error}]
                    [--max_module_instances MAX_MODULE_INSTANCES]
                    [--use_mtime_file_watcher [USE_MTIME_FILE_WATCHER]]
                    [--php_executable_path PATH]
                    [--php_remote_debugging [PHP_REMOTE_DEBUGGING]]
                    [--python_startup_script PYTHON_STARTUP_SCRIPT]
                    [--python_startup_args PYTHON_STARTUP_ARGS]
                    [--blobstore_path BLOBSTORE_PATH]
                    [--mysql_host MYSQL_HOST] [--mysql_port MYSQL_PORT]
                    [--mysql_user MYSQL_USER]
                    [--mysql_password MYSQL_PASSWORD]
                    [--mysql_socket MYSQL_SOCKET]
                    [--datastore_path DATASTORE_PATH]
                    [--clear_datastore [CLEAR_DATASTORE]]
                    [--datastore_consistency_policy {consistent,random,time}]
                    [--require_indexes [REQUIRE_INDEXES]]
                    [--auto_id_policy {sequential,scattered}]
                    [--logs_path LOGS_PATH]
                    [--show_mail_body [SHOW_MAIL_BODY]]
                    [--enable_sendmail [ENABLE_SENDMAIL]]
                    [--smtp_host SMTP_HOST] [--smtp_port SMTP_PORT]
                    [--smtp_user SMTP_USER]
                    [--smtp_password SMTP_PASSWORD]
                    [--prospective_search_path PROSPECTIVE_SEARCH_PATH]
                    [--clear_prospective_search [CLEAR_PROSPECTIVE_SEARCH]]
                    [--search_indexes_path SEARCH_INDEXES_PATH]
                    [--clear_search_indexes [CLEAR_SEARCH_INDEXES]]
                    [--enable_task_running [ENABLE_TASK_RUNNING]]
                    [--allow_skipped_files [ALLOW_SKIPPED_FILES]]
                    [--api_port API_PORT]
                    [--automatic_restart [AUTOMATIC_RESTART]]
                    [--dev_appserver_log_level {debug,info,warning,critical,error}]
                    [--skip_sdk_update_check [SKIP_SDK_UPDATE_CHECK]]
                    [--default_gcs_bucket_name DEFAULT_GCS_BUCKET_NAME]
                    yaml_files [yaml_files ...]
dev_appserver.py: error: unrecognized arguments: --admin_console_server= 2013-08-23 09:46:44 PM (Process exited with code 2)
我在运行Python2.7.3的Ubuntu12.04上。我曾尝试下载并运行Python2.7.5,但我不断遇到与上面类似的错误,除了一个提示说没有名为zlib的模块

针对这个问题,我从terminal运行了Python2.7.3,并尝试将其工作的zlib导入,但在Python2.7.5中尝试同样的方法时,却找不到zlib模块

我在这个问题上纠缠了好几个小时,找不到任何可以帮助我的东西

任何帮助都将不胜感激,谢谢

编辑:好的,我通过终端而不是谷歌应用引擎启动器运行了开发web服务器,它工作得非常好

我想这只是发射器里的一个bug

unrecognized arguments: --admin_console_server=
没有选项
--管理控制台\u服务器=

您可能希望将dev_appserver.py标志更改为错误消息中列出的标志,选项
--admin_console\u server=
已删除,但尚未更新启动器以删除此选项


你可以自己取下来。从
launcher/runtime.py
中删除行
'--admin\u console\u server=',
(自第9版起的第125行)。

我按照Michael的建议解决了这一问题,但导致了此处列出的另一个错误:

为此,dick_claus的解决方案是我推荐的,它指向以下链接:

最后,通过安装python2并运行以下命令,可以在默认为python3的计算机上运行GoogleAppEngineLaunch.py脚本:

python2 GoogleAppEngineLaunch.py
对于archlinux,包是python2(对于所有子包,使用python2-[子包名称])

但是,您可能与wxpython有冲突,为此,我将尝试删除/注释掉检查wxpython版本的行。对我来说,这是第28-33行

REQUIRED_WX_VERSION = (2,8)
CURRENT_WX_VERSION = wx.VERSION[:2]
if CURRENT_WX_VERSION != REQUIRED_WX_VERSION:
    print >>sys.stderr, ('wxPython version incorrect; is %d.%d, must be %d.%d' % \
        (CURRENT_WX_VERSION + REQUIRED_WX_VERSION))
sys.exit(2)
如果这有帮助,那么请通过链接的解决方案向dick_claus和上面的Michael投票,因为他们给出了原始解决方案。然而,我也需要因果报应,所以