/usr/bin/env: 'python3\r': No such file or directory error is throwing in Windows

时光毁灭记忆、已成空白 提交于 2020-01-24 01:46:06

问题


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

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. Installed python and configured the path variable
  2. Uninstalled python

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

How to solve this problem?


回答1:


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

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.




回答2:


The above is probably your problem. Also verify Python version 3 is installed with....

python3 --version

On the command line.



来源:https://stackoverflow.com/questions/53005107/usr-bin-env-python3-r-no-such-file-or-directory-error-is-throwing-in-window

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!