Error attempting to locate Jupyter: Running cells with (...) requires jupyter package.
See original GitHub issueEnvironment data
- VS Code version: 1.69.2
- Jupyter Extension version (available under the Extensions sidebar): v2022.6.1201981810
- Python Extension version (available under the Extensions sidebar): v2022.10.1
- OS (Windows | Mac | Linux distro) and version: macOS Monterey (12.4 (21F79))
- Python and/or Anaconda version: Python 3.10.5 / conda 4.13.0
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Jupyter server running: Local
Expected behaviour
Jupyter installation in conda environment is recognized by vscode-jupyter.
Actual behaviour
VS Code does not recognize correctly installed Jupyter packages in conda environments. Jupyter Notebooks in the browser can be launched successfully from the activated environment. When attempting to run a notebook in VS Code, an error is thrown:

info 12:44:44.504: Starting Jupyter Session id = 'startUsingPythonInterpreter:.jvsc74a57bd0ec1689aadfb31809087390f003aaaf48945ecfc3bbda01b3082716ecd7919b65./opt/miniconda3/envs/menv/python./opt/miniconda3/envs/menv/python.-m#ipykernel_launcher' (Python Path: /opt/miniconda3/envs/menv, EnvType: Conda, EnvName: 'menv', Version: 3.10.5) for '/Users/myuser/Downloads/Untitled.ipynb' (disableUI=true)
info 12:44:44.504: Checking for server existence.
info 12:44:44.504: Checking for server usability.
info 12:44:44.506: Server not usable (should ask for install now)
info 12:44:44.509: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
> /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
info 12:44:44.510: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import notebook"
> /opt/miniconda3/envs/menv/bin/python -c "import notebook"
warn 12:44:44.610: Error occurred while trying to start the kernel, options.disableUI=true [i [Error]: Jupyter cannot be started. Error attempting to locate Jupyter: Running cells with 'Python 3.10.5 ('menv')' requires jupyter package.
at S.startServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:98875)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async S.createServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:97995)
at async l.connect (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:75175)
at async g.create (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:95736)
at async p.createJupyterSession (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:160545)
at async p.start (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:154488)
at async Function.wrapKernelMethodImpl (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:336119)] {
category: 'jupyterinstall'
}
Any attempt to proceed by clicking “install” ends with:
info 12:59:11.118:
# All requested packages already installed.
Steps to reproduce:
- install miniconda (M1)
- create a new virtual environment (python 3.9) and install jupyter
- install VS Code (M1)
- install the Jupyter extension
- select the conda environment as kernel
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
info 13:13:3.698: Execute Cell 1 /Users/myuser/Downloads/Untitled1.ipynb
info 13:13:3.699: Starting Jupyter Session id = 'startUsingPythonInterpreter:.jvsc74a57bd0ec1689aadfb31809087390f003aaaf48945ecfc3bbda01b3082716ecd7919b65./opt/miniconda3/envs/menv/python./opt/miniconda3/envs/menv/python.-m#ipykernel_launcher' (Python Path: /opt/miniconda3/envs/menv, EnvType: Conda, EnvName: 'menv', Version: 3.10.5) for '/Users/myuser/Downloads/Untitled1.ipynb' (disableUI=false)
info 13:13:3.699: Checking for server existence.
info 13:13:3.700: Checking for server usability.
info 13:13:3.700: Server not usable (should ask for install now)
info 13:13:3.703: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
> /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
info 13:13:3.704: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import notebook"
> /opt/miniconda3/envs/menv/bin/python -c "import notebook"
warn 13:13:3.800: Error occurred while trying to start the kernel, options.disableUI=false [i [Error]: Jupyter cannot be started. Error attempting to locate Jupyter: Running cells with 'Python 3.10.5 ('menv')' requires jupyter package.
at S.startServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:98875)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async S.createServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:97995)
at async l.connect (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:75175)
at async g.create (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:95736)
at async p.createJupyterSession (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:160545)
at async p.start (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:154488)
at async Function.wrapKernelMethodImpl (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:336119)] {
category: 'jupyterinstall'
}
warn 13:13:3.800: Kernel Error, context = start [i [Error]: Jupyter cannot be started. Error attempting to locate Jupyter: Running cells with 'Python 3.10.5 ('menv')' requires jupyter package.
at S.startServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:98875)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async S.createServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:97995)
at async l.connect (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:75175)
at async g.create (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:95736)
at async p.createJupyterSession (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:160545)
at async p.start (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:154488)
at async Function.wrapKernelMethodImpl (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:336119)] {
category: 'jupyterinstall'
}
info 13:13:3.803: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
> /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
info 13:13:3.804: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import notebook"
> /opt/miniconda3/envs/menv/bin/python -c "import notebook"
info 13:13:5.815: Process Execution: > /opt/miniconda3/condabin/conda install -c conda-forge --name menv jupyter -y
> /opt/miniconda3/condabin/conda install -c conda-forge --name menv jupyter -y
info 13:13:6.313: Collecting package metadata (current_repodata.json): ...working...
info 13:13:7.200: done
info 13:13:7.200: Solving environment: ...working...
info 13:13:8.65: done
info 13:13:8.253:
# All requested packages already installed.
info 13:13:8.457: Process Execution: > /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
> /opt/miniconda3/envs/menv/bin/python -c "import jupyter"
info 13:13:8.469: Dispose Kernel '/Users/myuser/Downloads/Untitled1.ipynb' associated with '/Users/myuser/Downloads/Untitled1.ipynb'
error 13:13:8.469: Error in execution [i [Error]: Jupyter cannot be started. Error attempting to locate Jupyter: Running cells with 'Python 3.10.5 ('menv')' requires jupyter package.
at S.startServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:98875)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async S.createServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:97995)
at async l.connect (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:75175)
at async g.create (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:95736)
at async p.createJupyterSession (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:160545)
at async p.start (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:154488)
at async Function.wrapKernelMethodImpl (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:336119)] {
category: 'jupyterinstall'
}
error 13:13:8.469: Error in execution (get message for cell) [i [Error]: Jupyter cannot be started. Error attempting to locate Jupyter: Running cells with 'Python 3.10.5 ('menv')' requires jupyter package.
at S.startServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:98875)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async S.createServer (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:97995)
at async l.connect (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:75175)
at async g.create (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:95736)
at async p.createJupyterSession (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:160545)
at async p.start (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:154488)
at async Function.wrapKernelMethodImpl (/Users/myuser/.vscode/extensions/ms-toolsai.jupyter-2022.6.1201981810/out/extension.node.js:24:336119)] {
category: 'jupyterinstall'
}
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
"Running cells requires Jupyter notebooks to be installed ...
I have the same problem, and I am using the base environment. Although I can run jupyter notebook even from inside VS Code...
Read more >Cannot run Notebook from within VS Code "Running cells with ...
1. I run VS Code 1.59, and have the Julia, Jupyter, and Python extensions isntalled.
Read more >What to do when things go wrong - The Jupyter Notebook
If Jupyter gives an error that it can't find notebook , check with pip or conda that the notebook package is installed. Try...
Read more >My First Jupyter Notebook on Visual Studio Code (Python ...
For this blog post, I am creating the folder Jupyter-Notebooks in the following ... you can try and run the code within the...
Read more >Jupyter Notebooks in VS Code - YouTube
If you haven't tried, Visual Studio Code allows for working with Jupyter Notebooks natively, and through Python code files.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@avasyanin Your error is not the same as what @michaelweinold is seeing. Your system is failing to install because conda has not been initialized to support bash. If you create a conda terminal and then run
conda init bash
, it should fix our install.The same issue with jupyter package. In my case it is conda environment (macOS Monterey 12.4 arm64, VSCode 1.69.2 arm64), but trying to install pip package also fails.
Catched exactly after VSCode update to the latest version.