aws-shell icon indicating copy to clipboard operation
aws-shell copied to clipboard

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

Open abdulirfan3 opened this issue 9 years ago • 10 comments

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

abdulirfan3 avatar Dec 22 '15 22:12 abdulirfan3

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.

jamesls avatar Dec 24 '15 01:12 jamesls

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 avatar Jan 05 '16 13:01 abdulirfan3

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

abdulirfan3 avatar Jan 05 '16 13:01 abdulirfan3

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.

detlefm avatar Apr 03 '16 12:04 detlefm

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

nitrocode avatar Oct 12 '16 17:10 nitrocode

why does this software depend on my file association preferences?

szabolcsdombi avatar Dec 18 '17 14:12 szabolcsdombi

In Windows run Windows command as Administrator mode.

writetobegin avatar Jun 26 '18 04:06 writetobegin

This solution worked for me:

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

shinish avatar Jan 05 '20 07:01 shinish

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.

afmsavage avatar Jan 27 '20 19:01 afmsavage

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

janarthanandev avatar Mar 05 '21 14:03 janarthanandev