Vscode-jupyter: Unable to start session for kernel Python 3.7.7 64-bit

Created on 1 Sep 2020  路  1Comment  路  Source: microsoft/vscode-jupyter

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Create a new virtualenv with pyenv virtualenv bug (python 3.7.7)
  2. pyenv activate bug
  3. pip install ipykernel
  4. start vscode
  5. create a dummy file:
#%% 
import math
  1. Select the bug environment
  2. Run the first cell in the dummy file dummy.py:

Actual behavior

Running the cell first hangs ("Connecting to kernel"), then gives an error:
Unable to start session for kernel Python 3.7.7 64-bit ('bug': venv). Select another kernel to launch with.

Expected behavior

The cell should run.

Extra info

When I select an old environment, everything does seem to work! I can run everything with existing environments, however, if I create a new one (and restart vscode), it does not seem to work. I Included this in the logs. Around line 304 I switch to the rdv environment which I've had for a long time, where everything seems to work fine. I can't figure out where exactly the bug environment fails.

Your Jupyter and/or Python environment

_Please provide as much info as you readily know_

  • Jupyter server running: Local
  • Extension version: 2020.8.105369
  • VS Code version: 1.48.2
  • Setting python.jediEnabled: true | false. Unsure, I guess it's true.
  • Setting python.languageServer: Jedi
  • Python and/or Anaconda version: python 3.7.7, using pyenv. No Anaconda,
  • OS: Mac
  • Virtual environment: pyenv / virtualenv

Python Output

error-python.txt

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

bug

Most helpful comment

Hey @kvhooreb . Thanks for reporting. This is a duplicate of microsoft/vscode-python#13701 so I'm going to close this issue down. I've posted a workaround in that issue that you could try to see if it unblocks things.

>All comments

Hey @kvhooreb . Thanks for reporting. This is a duplicate of microsoft/vscode-python#13701 so I'm going to close this issue down. I've posted a workaround in that issue that you could try to see if it unblocks things.

Was this page helpful?
0 / 5 - 0 ratings