repo执行出现/usr/bin/env: ‘python’: No such file or directory问题

这篇具有很好参考价值的文章主要介绍了repo执行出现/usr/bin/env: ‘python’: No such file or directory问题。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

下载 Repo 工具,并确保它可执行:

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

chmod a+x ~/bin/repo 


执行 repo version报错:

$ repo version
/usr/bin/env: ‘python’: No such file or directory

查看cygwin软件,python是自动安装在/usr/bin/python3.8。
 

要指定repo执行时使用的Python解释器,你可以修改repo脚本的第一行,也被称为"shebang"行。

在repo脚本文件的第一行,你可以使用以下格式来指定要使用的Python解释器路径:

#!/usr/bin/python3.8

 这样,当你执行repo脚本时,它将使用指定的Python解释器来运行。


另外,cygwin 配置环境变量。
可以在  ~/.bashrc 文件里添加,例如:

alias python="/usr/bin/python3.8"
export python
alias ll="ls -la"
export ll
alias repo="~/bin/repo"
export repo

关闭文件后,运行以下命令使更改生效:

source ~/.bashrc



 文章来源地址https://www.toymoban.com/news/detail-744996.html

到了这里,关于repo执行出现/usr/bin/env: ‘python’: No such file or directory问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/local/cuda-10.2:/bin/nvcc‘

    完整报错:FileNotFoundError: [Errno 2] No such file or directory: \\\'/usr/local/cuda-10.2:/bin/nvcc\\\' 亲测有效!!!!! 解决方法:  安装成功! 参考:FileNotFoundError: [Errno 2] No such file or directory: \\\':/usr/local/cuda:/usr/local/cuda-10.1/bin/nvcc\\\': \\\':/usr/local/cuda:/usr/local/cuda-10.1/bin/nvcc\\\' · Issue #368 · NVIDIA/apex ·

    2024年02月13日
    浏览(29)
  • 运行命令出现错误 /bin/bash^M: bad interpreter: No such file or directory

    在系统上运行一个 Linux 的命令的时候出现下面的错误信息: -bash: ./build.sh: /bin/bash^M: bad interpreter: No such file or directory 这个是在 Windows 作为 WSL 的时候出的错误。 出现问题的原因在于脚本在 Windows 中使用的回车换行和 Linux 使用的回车换行不一样。 如果你的代码是在 Windows 下被

    2024年02月11日
    浏览(34)
  • Linux中执行bash脚本报错/bin/bash^M: bad interpreter: No such file or directory

    运行bash脚本会出现两个文件, 1037.err 和 1037.out 。 1037.err的文件内容如下: /data/home/user12/.lsbatch/1694577957.1037: /data/home/user12/.lsbatch/1694577957.1037.shell: /bin/sh^M: bad interpreter: No such file or directory 第一步 执行命令行:cat -A xxx.sh 第二步 使用下述命令直接替换结尾符为unix格式 命令行

    2024年02月07日
    浏览(31)
  • vscode 出现 No such file or directory 的解决办法(python tkinter)

    主要解决的问题是python在linux下包没办法安装的问题 Traceback (most recent call last): File “e:GithubPython-GUIPyQt-Fluent-Widgetsexamplesnavigationdemo.py”, line 202, in w = Window() File “e:GithubPython-GUIPyQt-Fluent-Widgetsexamplesnavigationdemo.py”, line 95, in init self.initWindow() File “e:GithubPython-GUIPyQt

    2024年02月10日
    浏览(23)
  • “/bin/bash“: stat /bin/bash: no such file or directory: unknown

    简介 :常规情况下,在进入容器时习惯使用 /bin/bash为结尾,如:docker exec -it test-sanic /bin/bash, 但是如果容器本身使用了精简版,只装了sh命令,未安装bash。这时就会抛出\\\"/bin/bash\\\": stat /bin/bash: no such file or directory: unknown 的错误。 历史攻略: sanic:通过dockerfile部署 解决步骤

    2024年01月19日
    浏览(36)
  • No such file or directory (os error 2) : 关于树莓派32位配置rust环境后执行rustc相关命令出现的错误.

    问题的前因: 最新32位树莓派os安装scrapy时提示rust版本需要=1.48.0. 手动安装rust,配置rust环境变量后执行rustc,cargo等相关命令时出现如题错误,参考国外网站给出的解决方案 执行如下两条命令:

    2024年02月12日
    浏览(38)
  • /usr/lib64/atlas/libsatlas.so: No such file or directory

    ref: software installation - g++: error: /usr/lib64/atlas/libsatlas.so: No such file or directory - Ask Ubuntu 

    2024年02月15日
    浏览(34)
  • 解决 /bin/bash^M: bad interpreter: No such file or directory

    linux 系统中知行*.sh 文件报/bin/bash^M: bad interpreter: No such file or directory 原因: .sh文件是在windows系统编写的,在linux执行就有问题 转化下格式执行如下命令 # dos2unix app.sh  结果bash: dos2unix: command not found 需要安装下dos2unix 接着执行:# yum install -y dos2unix 接着再执行:# dos2unix app.

    2024年02月08日
    浏览(34)
  • docker下载时报错 /usr/local/bin/docker-compose: 1: cannot open html: No such file

    docker 下载时报错 /usr/local/bin/docker-compose: 1: cannot open html: No such file /usr/local/bin/docker-compose: 2: Syntax error: redirection unexpected, 在网上查找了一些解决方法都不对,最后,通过删除/usr/local/bin/docker-compose 文件 重新安装docker 解决问题 删除命令: rm /usr/local/bin/docker-compose 然后重新

    2024年01月17日
    浏览(33)
  • Jenkins 安装 NodeJS 插件后无法识别Node环境:env node No such file or directory

    经验证,该问题在使用Jenkins官方文档中推荐的docker镜像 jenkinsci/blueocean 才会出现。 改用最新的Jenkins docker镜像就不会遇到: 我安装的是最新的Jenkins docker镜像: 然后运行镜像: 注意 docker run 时,镜像名为 jenkins/jenkins:lts ,而不是 jenkins/jenkins 。两者不同。 为什么 jenkinsci/blu

    2024年02月07日
    浏览(36)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包