为什么我要获取(gsutil):"C:\ Users \ user \ AppData \ Local \ Programs \ Python \ Python37 \ py

编程入门 行业动态 更新时间:2024-10-24 20:16:52
本文介绍了为什么我要获取(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:

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

  • 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 \ Pyth

    本文发布于:2023-07-05 07:51:48,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1034868.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:我要   找不到   命令   Users   user

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!