'Set Spyder as the default application to open .py files on WIN 10 machine

I would like to set Spyder as the default way to open any .py files on my WIN 10 machine. However, I encountered a small problem.

I right-clicked the .py file, selected open with, and then browsed to find the path of spyder.exe.

The .py file can be correctly opened but an annoying terminal always popped up.If I close the terminal, Spyder also quits.

enter image description here

Any thoughts on how to get rid of this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source