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.

I cannot select a Python 3.8 virtual environment for Jupyter notebook that is running remotely via SSH plugin

See original GitHub issue

Environment data

  • VS Code version: XXX Screen Shot 2021-12-09 at 2 03 38 AM

  • Jupyter Extension version (available under the Extensions sidebar): Screen Shot 2021-12-09 at 1 54 29 AM

  • Python Extension version (available under the Extensions sidebar): Screen Shot 2021-12-09 at 1 58 45 AM

  • OS (Windows | Mac | Linux distro) and version: XXX local OS: Mac OSX / remote OS:

$ lsb_release -a
LSB Version:	core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.6 LTS
Release:	18.04
Codename:	bionic

$ uname -a Linux ayan 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • Python and/or Anaconda version: XXX
lrwxrwxrwx 1 root root 9 Oct  1 19:43 /SeaExp/mona/venv/dpcc/bin/python -> python3.8

$ /SeaExp/mona/venv/dpcc/bin/python
Python 3.8.0 (default, Feb 25 2021, 22:10:10) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): XXX venv (but it doesn’t even allow to select it via pressing enter)
  • Jupyter server running: Local | Remote | N/A remote via the SSH extension Screen Shot 2021-12-09 at 2 02 42 AM
Screen Shot 2021-12-09 at 1 35 19 AM

^ When I press enter here in above image, nothing happens for change kernel. It keeps using Python 2. Screen Shot 2021-12-09 at 1 35 00 AM ^ I tried activating the virt env inside the Jupyter but no luck obviously.

Expected behaviour

To be able to use my own virt env /SeaExp/mona/venv/dpcc/bin/python here for running Jupyter ( I have no problem doing this for normal Python scripts inside VSCode remote)

Actual behaviour

Keeps using Python 2 for Jupyter ipynb notebooks.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. XXX

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

as you can see, I have no problem activating or using this Python Virtual Environment inside VSCode for running normal .py scripts. Screen Shot 2021-12-09 at 2 04 56 AM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
IanMatthewHuffcommented, Jan 21, 2022

@monajalal That control actually can’t accept just a path input. When working with python the dropdown selection should show all the possible options, which would be all the Jupyter kernels and Python environments that we detect on that machine.

When you mention your own native python environments do you mean on your machine? If you connect remotely you should just be seeing the python environments installed on that remote box that you are connected to.

1reaction
IanMatthewHuffcommented, Dec 10, 2021

Awesome, glad that it’s working for you now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Install, Run, and Connect to Jupyter Notebook on a ...
If you installed Jupyter Notebook on a remote server, you will need to connect to the Jupyter Notebook web interface using SSH tunneling....
Read more >
Python Virtual Environments & Jupyter Notebook | by Anne Bode
With a new Jupyter notebook open, you can click Kernel > Change kernel > and select the virtual environment you need. I hope...
Read more >
Cannot find python kernels corresponding to Virtual ...
When i open the notebook and select the python kernel, i can only find the default python kernels (from the server). I cannot...
Read more >
Python in Visual Studio Code
Using either method, Notebook Editor or a Python file, you can also connect to a remote Jupyter server for running the code. For...
Read more >
Databricks Connect - Azure - Microsoft Learn
If running with a virtual environment, which is the recommended way to develop for Python in VS Code, in the Command Palette type...
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