0

Running Python27 on windows. Trying to run the new AWS command line interface (found here: http://aws.amazon.com/cli/) , and getting the error "The syntax of the command is incorrect." when running anything.

Even "aws help" gives this error. I know everything is installed because a regular garbage command (asdf) gives a different error.

I get the same error in powershell as in cmd.

Googling around, the error is typically encountered when renaming/moving a file that has a space in it without using quote marks. I had hoped moving my python install to c:\python27\ would fix the issue, but it has not.

Jody
  • 8,021
  • 4
  • 26
  • 29
  • While not an answer to your question, if you are using windows, you could also user that AWS Tools for Windows PowerShell - https://aws.amazon.com/powershell/ – Wade Matveyenko Apr 24 '13 at 23:19

1 Answers1

0

Moving python to a non-space having path was the correct choice.

The aws command is a little aggressive in finding all your python installs. It searches your PATH directories for python.exe (or .bat or .cmd). I had changed this manually when I moved my python directory.

It also searches your file associations (which I had not changed) and was still finding c:\program files\python27\ and was choking on the space.

This question helped me fix the file associations, and I'm good to go now.

How do you change file association for .py Python files in XP?

If you find the aws command slightly slow, you probably speed it up by skipping all this searching nonsense and just hard coding your python.exe path into the aws.cmd file.

Community
  • 1
  • 1
Jody
  • 8,021
  • 4
  • 26
  • 29