question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to instal ipykernel when opening an interactive window

See original GitHub issue

Hi, I am trying to open an interactive window, but there seems to be a problem with the installation of ipykernel. I am new to python (and fairly new to VSCode), so would appreciate clear instructions.

Thanks in advance!

Steps to cause the bug to occur

  1. Type #%% before and after a line to create a cell for the Interactive Window
  2. Press Run Cell

Actual behavior

I get 2 pop-up messages on the bottom right corner saying

A: “Python 3.8.3 64-bit (‘myenv’: conda) requires ipykernel to be installed” B: “Connecting to IPython kernel: Fetching Kernels”

Comment A has an install button within the window, and when I click it, I get

` >& C:/Users/ivica/miniconda3/envs/myenv/python.exe c:\Users\ivica.vscode\extensions\ms-python.python-2020.9.112786\pythonFiles\pyvsc-run-isolated.py c:\Users\ivica.vscode\extensions\ms-python.python-2020.9.112786\pythonFiles\shell_exec.py conda install --name myenv ipykernel -y C:/Users/ivica/AppData/Local/Temp/tmp-20572SkUQWopUmqiq.log Executing command in shell >> conda install --name myenv ipykernel -y Collecting package metadata (current_repodata.json): done Solving environment: done

All requested packages already installed.`

(not where the first line starts… Should I worry about that?)

And, then, both messages A and B disappear and I get another pop-up C that says:

C: “IPyKernel not installed into interpreter Python 3.8.3 64-bit (‘myenv’: conda)”

I am using the correct python interpreter (Python 3.8.3 64-bit (‘myenv’:conda)).

Expected behavior

Don’t really know because I have never successfully run an interactive window, but I guess just run the selected cell.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Extension version: v2020.9.112786
  • VS Code version: 1.49.2 (user setup)
  • Setting python.jediEnabled: false? (I never enabled or disabled this, or interacted with it in any other way. Can’t find Setting python.jediEnabled)
  • Setting python.languageServer: Jedi
  • Python and/or Anaconda version: Python: 3.8.3, Miniconda3
  • OS: Windows
  • Virtual environment: I think myenv is not a virtual environment, but I am fairly new and am not entirely sure.

Thanks in advance

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
casasgomezuribarricommented, Oct 5, 2020

Thanks a lot! I followed one of the suggested solutions in jupyter/notebook#3435 (pip uninstall pyzmq pip install pyzmq) and now ipykernel can be imported from the python repl of my environment on the anaconda prompt.

However, now I get the “Timed out waiting to get a heartbeat from kernel process.” error when I try to Run Cell in the interactive window on VSCode. This is the new log:

-1601931395378.log

1reaction
casasgomezuribarricommented, Oct 10, 2020

Thank you! One of the solutions posted on that issue actually worked!!!

I installed pywin23==227 from the conda forge channel inside my environment, and now the interactive window works! Thank you very much @IanMatthewHuff for getting involved and helping out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python requires ipykernel to be installed - Stack Overflow
When i imported a new . ipynb file in VS Code while trying to run it, it gave the error "Running cells with...
Read more >
Installing the IPython kernel — IPython 8.7.0 documentation
conda create -n ipykernel_py2 python=2 ipykernel source activate ipykernel_py2 # On Windows, remove the word 'source' python -m ipykernel install --user.
Read more >
ipykernel - PyPI
This package provides the IPython kernel for Jupyter. Installation from source. git clone; cd ipykernel; pip install -e ".[test]".
Read more >
Working with Jupyter Notebooks in Visual Studio Code
Create, open, and save Jupyter Notebooks · Work with Jupyter code cells · View, inspect, and filter variables using the Variable Explorer and...
Read more >
How to Install, Run, and Connect to Jupyter Notebook on a ...
Jupyter Notebook is an open-source, interactive web application that allows you to write and run computer code in more than 40 programming ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found