为什么我要获取(gsutil):"C:\ Users \ user \ AppData \ Local \ Programs \ Python \ Python37 \ python.exe":找不到命令 [英] why am i getting (gsutil): "C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe": command not found

查看:2324
本文介绍了为什么我要获取(gsutil):"C:\ Users \ user \ AppData \ Local \ Programs \ Python \ Python37 \ python.exe":找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装Google cloud sdk并连接到所需的firebase项目后,我会收到:

After installing Google cloud sdk and connecting to desired firebase project i am receiving :

错误:(gsutil) "C:\ Users \ user \ AppData \ Local \ Programs \ Python \ Python37 \ python.exe": 运行任何gsutil命令时找不到该命令.

ERROR: (gsutil) "C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe": command not found when running any gsutil command.

我当前的stup是:

windows 10
Google Cloud SDK 281.0.0
bq 2.0.53
core 2020.02.14
gsutil 4.47
python 3.7

我的理论是,在正确"安装python的情况下,无法访问gsutil命令

My theory is, that while installed "correctly" python doesnt have access to gsutil commands

推荐答案

我遇到了同样的问题,并且可以通过为CLOUDSDK_PYTHON设置新的环境变量来解决该问题.在Windows 10上,您可以通过两种方式从命令行执行此操作:

I had the same problem and I was able to solve it by setting a new environment variable for CLOUDSDK_PYTHON. On windows 10 you can do this from the command line in 2 ways:

  1. 为当前终端会话设置环境变量 set CLOUDSDK_PYTHON="C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe"

  1. Set an env variable for the current terminal session set CLOUDSDK_PYTHON="C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe"

设置一个永久的环境变量 setx CLOUDSDK_PYTHON="C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe"

Set a permanent env variable setx CLOUDSDK_PYTHON="C:\Users\user\AppData\Local\Programs\Python\Python37\python.exe"

每个人的文件路径可能都不同,因此请首先检查python.exe的位置,然后使用您自己的路径.我希望这会有所帮助.

The file path will probably be different for everyone, so check first where is python.exe located and use your own path. I hope this helps.

这篇关于为什么我要获取(gsutil):"C:\ Users \ user \ AppData \ Local \ Programs \ Python \ Python37 \ python.exe":找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆