1

I am trying to deploy my site with EB CLI. Whenever I try to run $ eb --version, it always shows the error below, even though it works on my CMD. Can anyone help me with it? Thank you.

     /c/Users/username/AppData/Local/Programs/Python/Python35/Scripts/eb: 
     c:\users\user: bad interpreter: No such file or directory
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Jason Ching Yuk
  • 894
  • 2
  • 11
  • 30

4 Answers4

4

This error is related to your terminal and the environment it runs on. You get the same error with e.g. cygwin using git bash. In a script I had something like this:

#!/c/Program Files/some_program/executable.exe

Escaping the space with a backslash or using quotes didn't work.

The solution is to use the DOS' short filename:

  • Progra~1 for "Program Files"
  • Progra~2 for "Program Files (x86)"

So my line would turn into:

#!/c/Progra~1/some_program/executable.exe
Younes El Ouarti
  • 2,200
  • 2
  • 20
  • 31
2

Try double backslash:

C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python35\\Scripts\\eb

I was facing the same problem in ellipse, backslash and running the code in Python IDLE solved my problem.

SiHa
  • 7,830
  • 13
  • 34
  • 43
Bhuvan Kumar
  • 554
  • 1
  • 7
  • 23
1

In windows, it works for me using eb.exe instead of simply eb.

Federico Caccia
  • 1,817
  • 1
  • 13
  • 33
0

This did not work for me. I tried double-backslash. It seems that the 'eb' script is using the System or User paths to call other scripts. Even if I manually edit my System and User PATH variables in Windows to use quotes around each entry, I still hit the above issue.

My error:

$ /c/Users/myname/AppData/Roaming/Python/Python37/Scripts/eb -version
  bash: /c/Users/myname/AppData/Roaming/Python/Python37/Scripts/eb: 
  c:\program: bad interpreter: No such file or directory

It seems to be an issue with EB running on Bash.

So instead I made Visual Studio Code use cmd prompt instead of bash, using the following answer: https://stackoverflow.com/a/50527994/277601

mdiehl13
  • 472
  • 6
  • 19