awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.19k stars 775 forks source link

windows...File association not found for extension .py #83

Open abdulirfan3 opened 8 years ago

abdulirfan3 commented 8 years ago

Hello,

I was able to install aws-shell on windows successfully using pip, i am using python version 2.7.10. I get below error running any command...as you can see, even hitting the return key gives the same error...any idea what is causing this ??

image

jamesls commented 8 years ago

I'm not sure why you're getting '""' is not recognized as an internal or external command, but I've seen similar issues when the aws command is not on your PATH. I think we need to clean up the error messages here and improve the install docs for windows.

It might be worth also adding something in the RC file for specifying the path to the AWS CLI executable.

abdulirfan3 commented 8 years ago

Hi James, Sorry for the late response and Happy new year !!!

I do have aws command set in my PATH but still seem to get the error. AWS-SHELL was not in my path and was sitting in c:\python27\scripts\ directory. I tried putting that in the path as well, no luck...

abdulirfan3 commented 8 years ago

Forgot to mentioned, i did run a "pip install --upgrade aws-shell" and tried that new version and same issue...

detlefm commented 8 years ago

I had the same problem and found this as solution:

https://secretweaponsdigital.wordpress.com/2015/07/23/error-file-association-not-found-for-extension-py/

Error: File association not found for extension .py To fix “File association not found for extension .py” on Windows, execute the following two commands in a cmd.exe with administrator privileges:

assoc .py=py_auto_file ftype py_auto_file="C:\Anaconda\python.exe" "%1" %*

The first creates an file association. The second sets the program used to execute the file.

nitrocode commented 7 years ago

Had the same issue in Cygwin with the cygwin python installed. I removed all of the windows commands from /usr/bin/aws.cmd then renamed the file to aws.py, finally I aliased aws and aws.cmd to aws.py.

mv /usr/bin/aws.cmd /usr/bin/aws.py
alias aws.cmd=aws.py
alias aws=aws.py
szabolcsdombi commented 6 years ago

why does this software depend on my file association preferences?

writetobegin commented 6 years ago

In Windows run Windows command as Administrator mode.

shinish commented 4 years ago

This solution worked for me:

assoc .py=py_auto_file
ftype py_auto_file="C:\Anaconda\python.exe" "%1" %*
afmsavage commented 4 years ago

Please keep in mind, the fix that people are mentioning above is only if you have Anaconda installed and are using it for your python installation. There are tons of other default locations depending on version of Windows, version of Python installed, user VS system installation. So keep that in mind if you are going to use this trick. To find out where your python.exe is sourced from, type this command into a Powershell window: Get-Command python.

janarthanandev commented 3 years ago

I had the same problem and found this as solution:

https://secretweaponsdigital.wordpress.com/2015/07/23/error-file-association-not-found-for-extension-py/

Error: File association not found for extension .py To fix “File association not found for extension .py” on Windows, execute the following two commands in a cmd.exe with administrator privileges:

assoc .py=py_auto_file ftype py_auto_file="C:\Anaconda\python.exe" "%1" %*

The first creates an file association. The second sets the program used to execute the file.

thanks @detlefm It worked for me. you saved my time