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.

Run jupyter with kernel other than python

See original GitHub issue

Environment data

  • VS Code version: 1.32.3
  • Extension version (available under the Extensions sidebar): MS Python 2019.3.6352
  • OS and version: Ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): python 3.5.2 (also tried anaconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A also tried conda, both failed.
  • Relevant/affected Python packages and their versions: jupyter 4.4.0

Expected behaviour

The notebook runs the same as it does when I run it from the browser.

Actual behaviour

The installed kernel is not found and I get errors that indicate a “straight python” kernel was used.

Steps to reproduce:

  1. install almond.sh https://almond.sh/docs/quick-start-install
  2. cd almond/examples and launch juptyer, % jupyter notebook plotly_scala.ipynb
  3. copy the uri link that the notebook launch printed out
  4. launch vscode in that directory
  5. select the jupyter uri that the notebook launch supplied
  6. import the plotly_scala.ipynb notebook into vscode
  7. try executing cells until you hit the $ivy

Result: SyntaxError: invalid syntax

Logs

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

Starting Microsoft Python language server.
[Info  - 8:55:50 PM] GetCurrentSearchPaths /usr/bin/python3 
[Info  - 8:55:50 PM] Python search paths:
[Info  - 8:55:50 PM]     /usr/lib/python3.5
[Info  - 8:55:50 PM]     /usr/lib/python3.5/plat-x86_64-linux-gnu
[Info  - 8:55:50 PM]     /usr/lib/python3.5/lib-dynload
[Info  - 8:55:50 PM]     /home/langley/.local/lib/python3.5/site-packages
[Info  - 8:55:50 PM]     /usr/local/lib/python3.5/dist-packages
[Info  - 8:55:50 PM]     /usr/lib/python3/dist-packages
[Info  - 8:55:50 PM] Configuration search paths:
[Info  - 8:55:50 PM]     /usr/lib/python35.zip
[Info  - 8:55:50 PM]     /usr/lib/python3.5
[Info  - 8:55:50 PM]     /usr/lib/python3.5/plat-x86_64-linux-gnu
[Info  - 8:55:50 PM]     /usr/lib/python3.5/lib-dynload
[Info  - 8:55:50 PM]     /home/langley/.local/lib/python3.5/site-packages
[Info  - 8:55:50 PM]     /usr/local/lib/python3.5/dist-packages
[Info  - 8:55:50 PM]     /usr/lib/python3/dist-packages
[Info  - 8:55:50 PM]     /usr/bin
[Info  - 8:55:51 PM] Microsoft Python Language Server version 0.2.43.0
[Info  - 8:55:51 PM] Initializing for /usr/bin/python3

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXX

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
IanMatthewHuffcommented, Apr 4, 2019

@langley. Yeah, that’s the case for now, even if you start an external server. I hate having to say that, as we really want to support more of the various language kernels. But we started out with a Python focus and we still are pretty locked into that for the near future. Polyglot support is coming, but it won’t be right away.

4reactions
rattrayalex-stripecommented, Apr 23, 2019

Also excited for polyglot support. Not only for data science – being able to use VSCode as a general-purpose repl in Node, Ruby, etc would be really delightful, and could make the editor a much more integral part of developers’ workflows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jupyter notebook running kernel in different env - Stack Overflow
This is a tricky part of ipython / Jupyter. The set of kernels available are independent of what your virtualenv is when you...
Read more >
Link your Virtual Environment to Jupyter Using Kernels
Let the prompt run and install ipykernel . We can now create Python kernels for Jupyter. Using Virtual Environments in Jupyter as Kernels....
Read more >
Run jupyter with kernel other than python · Issue #3492 - GitHub
cd almond/examples and launch juptyer, % jupyter notebook plotly_scala.ipynb; copy the uri link that the notebook launch printed out; launch ...
Read more >
Kernels (Programming Languages) - Jupyter Documentation
Kernels #. Kernels are programming language specific processes that run independently and interact with the Jupyter Applications and their user interfaces.
Read more >
Using multiple kernels in Jupyter - wrighters.io
Jupyter notebooks run in a kernel, and it is possible to configure multiple kernels with different Python versions and dependencies.
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