I have encountered the same situation before, the following is my solution, and you could refer to it:
In the folder where VS Code extensions are stored (..:\Users\username.vscode\extensions), find the "Python" extension and the "Jupyter" extension, and then try to remove or delete them, then reopen VS Code, and install these two extensions:


I'm new to Python codin and I'm trying to create a new Jupyter notebook in my VSCode environment and facing issues.I installed Anaconda, created a custom envrironment with Python 3.9, ipnyb kernel and Jupyter stuff in it and made VS Code use it as the interpreter too. Installed both Python and Jupyter extensions.
Whenever I try to create a new ipnyb file by clicking Ctl+Shft+P and creating a new Jupyter notebook, I get the following error:
Command'Jupyter'Create New Jupyter Notebook' resulted in an error (command 'jupyter.createnewnotebook' not found)
Any ideas on how to fix this? Any help in resolving the issue is much appreciated.
Edit: Strange, now I get a different error. It says that the Jupyter extension failed to activate.
PS: Earlier I faced an issue with activating the Jupyter extension, and managed to solve the issue by adding the following line to the argv.json file from the Preferences: Configure Runtime Arguments option
"enable-proposed-api": ["ms-toolsai.jupyter"]
Cannot select current python interpreter as kernel
Unable to select interpreter to start Jupyter server
Error: Command 'Python: Select Interpreter' resulted in an error
python interpreter not recognizing in VS Code Jupyter notebook via conda environment
I have same issue using VSCode on Mac OS.
VSCode's 'Jupyter' plugin is broken, causing VSCode unable to bind with python interpreter. Downgrading from v2023.1.2000312134 to v2022.11.1003412109 fixed my issue.

I had the same issue, running on m1 mac (Ventura 13.2). If you aren't already, make sure you are utilising a python virtual environment:
# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
Form your VSCode Command Palette (Shift+Command+P), search and then choose
Jupyter: Select Interpreter to Start Jupyter Server
You should then select the python version that is associated to your virtual environment (venv).
I believe what you are looking for is how to change the Kernel you are running. If you go to the Kernel menu in Jupyter, you will see the option to change kernels.

If you want to add a new kernel from a conda environment, terminate jupyter, activate the environment you want to add a kernel for, and then run this command (requires conda install ipykernel -- thx @shad):
python -m ipykernel install --user --name <kernel_name> --display-name "<Name_to_display>"
Make sure to replace <kernel_name> and <Name_to_display> to the name of your environment. Also, this requires you to conda install ipykernel (thanks @shad).
Once you installed the kernel, you can change to it through the above menu and even through this code snippet from a Jupyter cell:
%%javascript
Jupyter.notebook.session.restart({kernel_name: '<kernel_name>'})
Activate first the env you want to use:
conda activate myenv
Then start jupyter afterwards:
jupyter notebook /path/to/your/dir
If you are absolutely sure that your Python library path is in your system variables (and you can find that path when you pip install Jupyter, you just have to read a bit) and you still experience "command not found or recognized" errors in Windows, you can try:
python -m notebook
For my Windows at least (Windows 10 Pro), having the python -m is the only way I can run my Python packages from command line without running into some sort of error:
Fatal error in launcher: Unable to create process using ' "
or
Errno 'THIS_PROGRAM' not found
Please try either of these commands first;
py -m notebook
python -m notebook
For JupyterLab users:
py -m jupyterlab
Otherwise
python -m pip install jupyter --user
jupyter notebook
If this does not work.
pip does not add Jupyter directly to path for local.
The output from
which python
Output:
/c/Users/<username>/AppData/Local/Programs/Python/Python35-32/python
After some digging, I found a executable for Jupyter in the folder:
C:\Users\<username>\AppData\Roaming\Python\Python35\Scripts\jupyter.exe
Difference between local and roaming folder
So if you want to be able to execute a program via command line, you need to add it into the %PATH variable. Here is a PowerShell script to do it. BE SURE TO ADD THE ";" before adding the new path.
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Users\<username>\AppData\Roaming\Python\Python35\Scripts", [EnvironmentVariableTarget]::User)
If you are using python3, switch out python with python3
but I encourage you to use pyenv instead :)
For
.pyscriptsCtrl+Shift+P --> Python: Select Interpreter

For Jupyter Notebook
Click
Select Kernelin the upper right corner (Or the kernel version already shown) SelectPython Environments....

These are two different ways of choosing a python environment.
try anaconda software, in this software contain jupiter notebook but its doesn't contain any error to interpret python program and its interpreter is good working condition than VScode.