I am facing an issue where I can run Python seamlessly within Visual Studio Code and the Python terminal. However, when I try to create a Python virtual environment using the command python -m venv venv or check the Python version with python --version, I encounter the following error message:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
I have attempted to resolve this by uninstalling and reinstalling Python multiple times, and I even downloaded it from the Microsoft Store as prompted. Despite Python being successfully installed and capable of executing Python commands, the Command Prompt does not recognize its presence on my computer.
I even created a new folder containing a blank Python file and attempted to create a virtual environment from there, but the issue persists. My research into this problem has not yielded any conclusive explanations. Can anyone provide insights into why this might be happening?

/full/path/to/python. If you run code outside IDE you may also need to use/full/path/to/python, or you have to add/full/path/to(withoutpython) to variablePATHand system will know where to searchpythonwhen you run it without full path.