/ usr / bin / env:'python3\r':Windows中没有抛出这样的文件或目录错误 [英] /usr/bin/env: 'python3\r': No such file or directory error is throwing in Windows

查看:324
本文介绍了/ usr / bin / env:'python3\r':Windows中没有抛出这样的文件或目录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从下面的存储库' https:// github在我的Windows本地计算机中部署hyperlegder锯齿.com / hyperledger / education '。

I am trying to deploy the hyperlegder sawtooth in my windows local machine from the below repository 'https://github.com/hyperledger/education'.

使用Docker启动应用程序时, tunachain出现错误-tp 如下

When I start the application using Docker, then I am getting an error for the tunachain-tp as below

tunachain-tp        | /usr/bin/env: 'python3\r': No such file or directory

我有尝试通过以下方式解决问题

I have tried to solve the problem in the below ways


  1. 已安装python并配置了路径变量

  2. 未安装python

但是,不幸的是,没有一个解决方案适合我。

But, unfortunately none of the solution is worked out for me.

如何解决此问题?

推荐答案

您的问题不是Python,而是文件编码。

Your issue is not with Python but with your file encoding.

这是Windows文件(行 \r\n 的结尾),但文件应为Unix(行 \n )。要在Windows上解决此问题,可以在Notepad ++-> Unix行尾进行。您还可以将cygwin(或docker容器内的Linux实际上)与 dos2unix 一起使用。

It is a Windows file (end of line \r\n) but the file should be Unix (end of line \n). To fix this on Windows, you can do this in Notepad++ -> end of line Unix. You can also use cygwin (or Linux inside the docker container actually) with dos2unix.

这篇关于/ usr / bin / env:'python3\r':Windows中没有抛出这样的文件或目录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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