0

Getting error while running pyspark project using Docker in windows 10:

env: 'python3\r': No such file or directory

Python file:

#!/usr/bin/env python3

Tried the following ways:

  1. unix2dos - Converted the file in dos format using a linux box and downloaded the file from linux box to windows local machine.
  2. Sublime Text3 - Saved the file as a python file and then tried running it, but same error.

Reference:

  1. env: python\r: No such file or directory
  2. https://askubuntu.com/questions/896860/usr-bin-env-python3-r-no-such-file-or-directory
James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

1

What I did was to create a new file. Copy the buggy file (issue with 'python3\r') and pasted in a normal file without the "#!/usr/bin/env python3". Then save it with the .py extention and type by hand (without copy paste) "#!/usr/bin/env python3".

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Rodrigo
  • 121
  • 1
  • 3