Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.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路径无法正常工作_Python_Windows_Path_Environment Variables - Fatal编程技术网

Python路径无法正常工作

Python路径无法正常工作,python,windows,path,environment-variables,Python,Windows,Path,Environment Variables,最近我遇到了一些关于Pythonpath的问题。当我想通过cmd运行用Python编写的东西时,它会返回help菜单,而不是执行脚本 我不明白为什么会这样,因为我已经检查了环境路径,并且有C:\Python27\ 它以Django开始,例如CMD:manage.py migrate返回manage.py的帮助。当我执行CMD:python manage.py migrate时,一切正常 下面是一段环境变量: C:\ProgramData\Oracle\Java\javapath;C:\Pytho

最近我遇到了一些关于
Python
path的问题。当我想通过
cmd
运行用
Python
编写的东西时,它会返回
help
菜单,而不是执行脚本

我不明白为什么会这样,因为我已经检查了
环境路径
,并且有
C:\Python27\

它以
Django
开始,例如
CMD:manage.py migrate
返回
manage.py
的帮助。当我执行
CMD:python manage.py migrate
时,一切正常

下面是一段
环境变量

C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;
你知道哪里有问题吗

例如,
googleappengine

C:\Users\Milano>appcfg.py -A deep-burner-11xxx3 update app.yaml
Usage: appcfg.py [options] <action>

Action must be one of:
  backends: Perform a backend action.
  backends configure: Reconfigure a backend without stopping it.
  backends delete: Delete a backend.
  backends list: List all backends configured for the app.
  backends rollback: Roll back an update of a backend.
  backends start: Start a backend.
  backends stop: Stop a backend.
  backends update: Update one or more backends.
  create_bulkloader_config: Create a bulkloader.yaml from a running application.

  cron_info: Display information about cron jobs.
  delete_version: Delete the specified version for an app.
  download_app: Download a previously-uploaded app.
  download_data: Download entities from datastore.
  help: Print help for a specific action.
  list_versions: List all uploaded versions for an app.
  request_logs: Write request logs in Apache common log format.
  resource_limits_info: Get the resource limits.
  rollback: Rollback an in-progress update.
  set_default_version: Set the default (serving) version.
  start_module_version: Start a module version.
  stop_module_version: Stop a module version.
  update: Create or update an app version.
  update_cron: Update application cron definitions.
  update_dispatch: Update application dispatch definitions.
  update_dos: Update application dos definitions.
  update_indexes: Update application indexes.
  update_queues: Update application task queue definitions.
  upload_data: Upload data records to datastore.
  vacuum_indexes: Delete unused indexes from application.
Use 'help <action>' for a detailed description.

Options:
  -h, --help            Show the help message and exit.
  -q, --quiet           Print errors only.
  -v, --verbose         Print info level logs.
  --noisy               Print all logs.
  -s SERVER, --server=SERVER
                        The App Engine server.
  -e EMAIL, --email=EMAIL
                        The username to use. Will prompt if omitted.
  -H HOST, --host=HOST  Overrides the Host header sent with all RPCs.
  --no_cookies          Do not save authentication cookies to local disk.
  --skip_sdk_update_check
                        Do not check for SDK updates.
  -A APP_ID, --application=APP_ID
                        Set the application, overriding the application value
                        from app.yaml file.
  -M MODULE, --module=MODULE
                        Set the module, overriding the module value from
                        app.yaml.
  -V VERSION, --version=VERSION
                        Set the (major) version, overriding the version value
                        from app.yaml file.
  -r RUNTIME, --runtime=RUNTIME
                        Override runtime from app.yaml file.
  -E NAME:VALUE, --env_variable=NAME:VALUE
                        Set an environment variable, potentially overriding an
                        env_variable value from app.yaml file (flag may be
                        repeated to set multiple variables).
  -R, --allow_any_runtime
                        Do not validate the runtime in app.yaml
  --oauth2              Ignored (OAuth2 is the default).
  --oauth2_refresh_token=OAUTH2_REFRESH_TOKEN
                        An existing OAuth2 refresh token to use. Will not
                        attempt interactive OAuth approval.
  --oauth2_access_token=OAUTH2_ACCESS_TOKEN
                        An existing OAuth2 access token to use. Will not
                        attempt interactive OAuth approval.
  --authenticate_service_account
                        Authenticate using the default service account for the
                        Google Compute Engine VM in which appcfg is being
                        called
  --noauth_local_webserver
                        Do not run a local web server to handle redirects
                        during OAuth authorization.
  -f, --force           Force deletion without being prompted.
  --force_rollback      Force rollback.
  --exporter_opts=EXPORTER_OPTS
                        A string to pass to the Exporter.initialize method.
  --result_db_filename=RESULT_DB_FILENAME
                        Database to write entities to during config
                        generation.
  --url=URL             The location of the remote_api endpoint.
  --batch_size=BATCH_SIZE
                        Number of records to post in each request.
  --bandwidth_limit=BANDWIDTH_LIMIT
                        The maximum bytes/second bandwidth for transfers.
  --rps_limit=RPS_LIMIT
                        The maximum records/second for transfers.
  --http_limit=HTTP_LIMIT
                        The maximum requests/second for transfers.
  --db_filename=DB_FILENAME
                        Name of the progress database file.
  --auth_domain=AUTH_DOMAIN
                        The name of the authorization domain to use.
  --log_file=LOG_FILE   File to write bulkloader logs.  If not supplied then a
                        new log file will be created, named: bulkloader-log-
                        TIMESTAMP.
  --dry_run             Do not execute any remote_api calls
  --namespace=NAMESPACE
                        Namespace to use when accessing datastore.
  --num_threads=NUM_THREADS
                        Number of threads to transfer records with.
  --filename=FILENAME   The name of the file containing the input data.
                        (Required)
  --kind=KIND           The kind of the entities to store.
  --has_header          Whether the first line of the input file should be
                        skipped
  --loader_opts=LOADER_OPTS
                        A string to pass to the Loader.initialize method.
  --config_file=CONFIG_FILE
                        Name of the configuration file.
  --num_runs=NUM_RUNS   Number of runs of each cron job to displayDefault is 5
  --no_precompilation   Disable automatic precompilation (ignored for Go
                        apps).
  --backends            Update backends when performing appcfg update.
  --no_usage_reporting  Disable usage reporting.
  -I INSTANCE, --instance=INSTANCE
                        Instance to lock/unlock.
  -n NUM_DAYS, --num_days=NUM_DAYS
                        Number of days worth of log data to get. The cut-off
                        point is midnight US/Pacific. Use 0 to get all
                        available logs. Default is 1, unless --append is also
                        given; then the default is 0.
  -a, --append          Append to existing file.
  --severity=SEVERITY   Severity of app-level log messages to get. The range
                        is 0 (DEBUG) through 4 (CRITICAL). If omitted, only
                        request logs are returned.
  --vhost=VHOST         The virtual host of log messages to get. If omitted,
                        all log messages are returned.
  --include_vhost       Include virtual host in log messages.
  --include_all         Include everything in log messages.
  --end_date=END_DATE   End date (as YYYY-MM-DD) of period for log data.
                        Defaults to today.
C:\Users\Milano>appcfg.py-A deep-burner-11xxx3更新app.yaml
用法:appcfg.py[选项]
行动必须是以下行动之一:
后端:执行后端操作。
后端配置:在不停止的情况下重新配置后端。
后端删除:删除后端。
后端列表:列出为应用程序配置的所有后端。
后端回滚:回滚后端的更新。
后端启动:启动后端。
后端停止:停止后端。
后端更新:更新一个或多个后端。
create_bulkloader_config:从正在运行的应用程序创建一个bulkloader.yaml。
cron_info:显示有关cron作业的信息。
删除版本:删除应用程序的指定版本。
下载应用程序:下载以前上载的应用程序。
下载数据:从数据存储中下载实体。
帮助:打印特定操作的帮助。
列出应用程序的所有上载版本。
请求日志:以Apache通用日志格式编写请求日志。
资源限制信息:获取资源限制。
回滚:回滚正在进行的更新。
设置默认版本:设置默认(服务)版本。
启动模块版本:启动模块版本。
停止模块版本:停止模块版本。
更新:创建或更新应用程序版本。
update_cron:更新应用程序cron定义。
更新调度:更新应用程序调度定义。
更新dos:更新应用程序dos定义。
更新索引:更新应用程序索引。
更新队列:更新应用程序任务队列定义。
上传数据:将数据记录上传到数据存储。
索引:从应用程序中删除未使用的索引。
详细说明请使用“帮助”。
选项:
-h、 --帮助显示帮助消息并退出。
-q、 --仅限安静打印错误。
-v、 --详细的打印信息级别日志。
--打印所有日志。
-s服务器,--SERVER=SERVER
应用程序引擎服务器。
-电子邮件,--EMAIL=EMAIL
要使用的用户名。如果省略,将提示。
-H HOST,--HOST=HOST覆盖随所有RPC一起发送的主机标头。
--no_Cookie不会将身份验证Cookie保存到本地磁盘。
--跳过sdk更新检查
不要检查SDK更新。
-应用程序ID,--application=APP\u ID
设置应用程序,覆盖应用程序值
从app.yaml文件。
-M模块,--模块=模块
设置模块,覆盖来自的模块值
app.yaml。
-V版本,--VERSION=VERSION
设置(主)版本,覆盖版本值
从app.yaml文件。
-r RUNTIME,--RUNTIME=RUNTIME
从app.yaml文件重写运行时。
-E NAME:VALUE,--env_变量=NAME:VALUE
设置环境变量,可能会覆盖
app.yaml文件中的env_变量值(标记可能为
重复设置多个变量)。
-R、 --允许任何\u运行时
不要在app.yaml中验证运行时
--忽略oauth2(oauth2是默认值)。
--oauth2_刷新_令牌=oauth2_刷新_令牌
要使用的现有OAuth2刷新令牌。不会
尝试交互式OAuth批准。
--oauth2_访问_令牌=oauth2_访问_令牌
要使用的现有OAuth2访问令牌。不会
尝试交互式OAuth批准。
--验证\u服务\u帐户
使用的默认服务帐户进行身份验证
正在使用appcfg的Google计算引擎VM
打电话
--noauth_本地_网络服务器
不要运行本地web服务器来处理重定向
在OAuth授权期间。
-f、 --在没有提示的情况下强制删除。
--强制回滚强制回滚。
--导出器选择=导出器选择
要传递给Exporter.initialize方法的字符串。
--result\u db\u filename=result\u db\u filename
配置期间要将实体写入的数据库
一代
--url=url远程api端点的位置。
--批次大小=批次大小
每个请求中要发布的记录数。
--带宽限制=带宽限制
传输的最大字节/秒带宽。
--rps_极限=rps_极限
传输的最大记录数/秒。
--http\u limit=http\u limit
传输的最大请求数/秒。
--db\u filename=db\u filename
进度数据库文件的名称。
--认证域=认证域
要使用的授权域的名称。
--log_file=用于写入散货加载器日志的log_file文件。如果未提供,则
将创建新的日志文件,名为:bulkloader日志-
时间戳。
--dry_run不执行任何远程_api调用
--名称空间=名称空间
访问datastor时要使用的命名空间