Maybe there is problem with your interpreter.

Try this: Ctrl + Shift + PPython: Select Interpreter → select your path (C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe)

https://code.visualstudio.com/docs/python/environments

Answer from Kezif Garbian on Stack Overflow
🌐
GitHub
github.com › microsoft › vscode-python › issues › 21610
VSCode won't run python code anymore using run-button · Issue #21610 · microsoft/vscode-python
July 11, 2023 - Type: Bug Since a recent update of VSCode, none of the "run" buttons / menu-entries / key-combo's work anymore when trying to run any python-script. There's nothing happening, no warning, no error, nothing. Manually entering "python.exe ...
Author   bartgrefte
Discussions

Why is python not working in vscode?
You don't need code runner plugin to run python in vscode. Just get the python plugin. And install python form the official python website if you still did not install it. Then run your code from vscode (without code runner plugin) and show us any errors you are getting from this process... More on reddit.com
🌐 r/learnpython
6
3
March 30, 2025
Cant run python code in vs code - Python - Code with Mosh Forum
every time i try to code using vs code in my m2 macbook air i get the following message in output , i am new to coding /bin/sh: python: command not found More on forum.codewithmosh.com
🌐 forum.codewithmosh.com
0
May 31, 2023
When I try to run Python code in VS Code nothing shows up except the file directory
if your code doesn't print anything using the "print" code line, then nothing will get printed. More on reddit.com
🌐 r/learnpython
19
14
December 27, 2023
Python vs-code does not run (no-error)
Sounds like an env issue. Did you install python? Did you install VS Code python extension? When running your code select run in a new terminal. More on reddit.com
🌐 r/pythontips
7
8
May 23, 2024
🌐
Python.org
discuss.python.org › python help
Visual Studio Code script won't run - Python Help - Discussions on Python.org
January 3, 2023 - I’m trying to run a simple script with a single print statement in VS Code and am getting the following error. I have Anaconda installed obviously and am able to open up spyder and jupyter notebook and run scripts fr…
🌐
Code with Mosh
forum.codewithmosh.com › python
Cant run python code in vs code - Python - Code with Mosh Forum
May 31, 2023 - every time i try to code using vs code in my m2 macbook air i get the following message in output , i am new to coding /bin/sh: python: command not found
🌐
Visual Studio Code
code.visualstudio.com › docs › python › python-tutorial
Getting Started with Python in VS Code
November 3, 2021 - Ensure your new environment is selected by using the Python: Select Interpreter command from the Command Palette. Note: For additional information about virtual environments, or if you run into an error in the environment creation process, see Environments. From the File Explorer toolbar, select the New File button on the hello folder: Name the file hello.py, and VS Code will automatically open it in the editor:
🌐
Visual Studio Code
code.visualstudio.com › docs › languages › python
Python in Visual Studio Code
November 3, 2021 - To enable Python support for Jupyter notebook files (.ipynb) in VS Code, you can install the Jupyter extension. The Python and Jupyter extensions work together to give you a great Notebook experience in VS Code, providing you the ability to directly view and modify code cells with IntelliSense support, as well as run and debug them.
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › when i try to run python code in vs code nothing shows up except the file directory
r/learnpython on Reddit: When I try to run Python code in VS Code nothing shows up except the file directory
December 27, 2023 -

It's been doing that sometimes. I try clicking out of the window of VS Code, exiting out entirely, try running another code from a different file first, click the run button 'till I can't run anymore, but a lot of the time it just keeps showing the name of the file. Sometimes it'll work, but a lot of the time it doesn't. Could it be particular errors in the code? That wouldn't make sense since it's supposed to indicate there's an error. Any help would be appreciated.

🌐
Reddit
reddit.com › r/pythontips › python vs-code does not run (no-error)
r/pythontips on Reddit: Python vs-code does not run (no-error)
May 23, 2024 -

Hello,

I am having trouble with running my code. My code has nothing wrong with it, and Python is not telling me I have an error anywhere. But, when I try to run my code, it does not produce any outputs, even if I just try to print "hello". The terminal just tells me where my file is located instead of outputting the code, every time I run it

i.e. this is what terminal outputs for print("hello")

/Users/user/anaconda3/bin/python "/Users/user/Documents/Comp2300/assignment/A2 /A2codes.py"

Please let me know if you have any solutions.

My assignment is due tomorrow p_p.

Thanks

🌐
Visual Studio Code
code.visualstudio.com › docs › python › run
Running Python code in Visual Studio Code
November 3, 2021 - Smart Send looks at the code where the cursor is placed, sends the smallest runnable chunk of code to the Python REPL, and then places your cursor at the next line of code. This enables you to easily and efficiently run Python code in your program. Smart Send will not work on unsupported versions of Python (for example, Python 2) or invalid Python code.
🌐
Reddit
reddit.com › r/learnpython › can’t run python function directly in vs code integrated terminal
r/learnpython on Reddit: Can’t Run Python Function Directly in VS Code Integrated Terminal
November 26, 2024 -

Hi everyone,

I’m having an issue executing a Python function directly in the integrated terminal of Visual Studio Code. Here’s the situation: 1. I have a Python file named math ex dm.py, and the code inside looks like this:

from math import * def mystère(a, b): if b == 0: return a, 1, 0 else: d, u, v = mystère(b, a % b) y = u - (a // b) * v return d, v, y

2.	In the VS Code terminal, I want to execute the function mystère(71, 19) directly. I type:

mystère(71, 19)

3.	However, I get the following error:

mystère: The term 'mystère' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

What I’ve Tried:

•	Ensured the Python file is properly saved in the correct directory.
•	Verified that Python is installed (python --version outputs Python 3.11.5).
•	Confirmed that VS Code is using the correct Python interpreter.
•	Tried running python "math ex dm.py" in the terminal to execute the script, which works fine but doesn’t let me interactively call the mystère function.

My Goal:

I want to be able to call the mystère(71, 19) function directly from the terminal, not just by running the entire file. Is this possible in VS Code’s integrated terminal?

Any advice on how to fix this or properly interact with Python functions in VS Code would be greatly appreciated!

Thanks!

🌐
GitHub
github.com › microsoft › vscode-python › issues › 16429
Vscode not running python file from its path instead using workspace path despite enabling the option Terminal: Execute in file dir · Issue #16429 · microsoft/vscode-python
June 9, 2021 - Vscode runs the python file from the workspace path. forcing the python script to search in the workspace folder instead of the folder where it's supposed to be located in for other files · [NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Author   ShaleenAg
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
Cant run a simple python program on VS Code - Linux Mint Forums
November 2, 2024 - It means that the file hello.py is not in your Home directory. Because ~$ means you are in your Home directory. Where did you place the file exactly? You have to change directory to the folder that has the file in it. If you need command line basics, try Linux Journey https://linuxjourney.com/ ...
🌐
GitHub
github.com › microsoft › vscode-python › issues › 5916
Pressing "run python file in terminal" doesn't work · Issue #5916 · microsoft/vscode-python
June 5, 2019 - Pressing "run python file in terminal" doesn't work since the update. Worked fine with older version of the python extension. Verified on a clean vscode profile with just one vscode-python Environment data VS Code version: 1.34.0 Extensi...
Author   Meru
🌐
Medium
medium.com › @haqqyar › python-is-not-running-in-vs-code-learn-to-fix-the-issue-79ad518d57e2
Python is not running in VS Code learn to fix the issue. - GreatLearner - Medium
September 18, 2022 - Python is not running in VS Code learn to fix the issue. When you was installing python you were missed the add to path option that way it’s not running in your editor. There are many solutions of …
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 228658 › ms-learn-python-code-not-running-in-visual-studio
MS Learn Python - code not running in Visual Studio (newbie) - Microsoft Q&A
January 12, 2021 - Specifically, I have to run the program three times before it ends. I have attached a screen grab from the terminal output from the program. My assumption is that this might have something to do with Visual Studio set up as the output from the Microsoft example code does not match the provided output.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5594952 › issue-with-the-interpreter-in-visual-studio-code
Issue with the interpreter in Visual Studio Code - Microsoft Q&A
October 23, 2025 - The issue is that right-clicking and choosing “Open with Python” runs the file in a new window that closes immediately — that’s normal behavior and not the right way to run Python scripts when you want to see the output.