Search code examples
pythoncmd

Running .py file from cmd opens the python modify setup


I have a python file located at myFile.py that works perfectly fine when I run it from visual studio code or any python file launcher.

The problem is that whenever I run it using the python myFile.py command in the windows command prompt it just opens the Python Modify Setup (image below) instead of running the file. Repairing or modifying python isn't the solution.

enter image description here

Here's a video showing the problem.


Solution

  • This problem is due to the python installation file python.exe being in the same directory as myFile.exe. It should be removed from that working directory.