0

I am having trouble opening .py files. when I run the code, it opens gpython.exe and then also it does'nt execute it. I have reinstalled python(version 3.6). but then also it opens gpython.exe It opens gython.exe as seen in the screenshotSame with VS code

also when I have to install any python module through pip it opens gpython.exe please help me solve this error using Windows - 10 32 bit, python version - 3.6

phd
  • 82,685
  • 13
  • 120
  • 165
  • I'm not sure what `gpython.exe` is, although I did find a project with that name that seems to integrate python and go. Perhaps you've installed some software that has a gpython.exe and it took over the file association for .py. On the command line you could run `ftype` and `assoc` to see what your associations are. – tdelaney Dec 04 '20 at 05:10
  • I'm guessing you installed `gpython` and associated it with the `.py` extensions. Is there a reason you installed it? The simplest solution would be to uninstall it, and possibly uninstall/reinstall CPython (the reference interpreter) to explicitly associated it (or more precisely, the `py.exe` launcher) with the `.py` file type. – ShadowRanger Dec 04 '20 at 05:10
  • This is the way to run python file : (https://stackoverflow.com/questions/39462632/how-to-run-python-files-in-windows-command-prompt) But try to uninstall and reinstall : (https://www.python.org/downloads/) And the check python installed or not : type python and press Enter in cmd – G.W Kalpa Sathjana De Silva Dec 04 '20 at 05:22

1 Answers1

0

Use python3 [file name] for python 3.

jort57
  • 76
  • 1
  • 10