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.

Document how to use Python & Jupyter

See original GitHub issue
  1. First, add these lines to your Dockerfile to install Miniconda/Anaconda:
RUN curl -sfLO https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh \
 && /bin/bash Miniconda3-py39_4.9.2-Linux-x86_64.sh -b -p /root/miniconda \
 && PATH="/root/miniconda/bin:$PATH" \
 && conda install -c anaconda jupyter
  1. Then, install the Python Extension and make sure it comes with the Jupyter Extension or you can add this line to your Dockerfile:
RUN code-server --install-extension ms-python.python
RUN code-server --install-extension ms-toolsai.jupyter
  1. Next, in Code-Server create a file with the extension .ipynb like main.ipynb and set your Python Interpreter as the location of miniconda (~/miniconda/bin/python).
  2. Finally, you can add your python code to the file and it should work perfectly. Screen Shot 2021-10-09 at 6 35 56 PM Screen Shot 2021-10-09 at 6 36 52 PM

If this doesn’t work use the Dockerfile from https://github.com/cdr/code-server/issues/3199#issuecomment-828745169

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
edvincentcommented, Oct 17, 2021

@jsjoeio I finally got around to read your (great!) worklog in https://github.com/cdr/code-server/issues/3874 and I’m not sure we fixed the original root-cause, which is still what @0x0L is seeing here?

As in, I think the problem you fixed with https://github.com/cdr/code-server/pull/4231 was a change on the API itself for the future versions of vscode (as it was the insider’s version).

The current root-cause still is that the ms-toolsai.jupyter scraped and exposed in the default gallery of code-server (https://storage.googleapis.com/vscode-extension-assets/vscode-extensions/vscode/ms-toolsai/jupyter/2021.8.12/Microsoft.VisualStudio.Services.VSIXPackage) is missing the extension itself, as the out/ folder is missing some nested folder:

  • out/client_renderer/ exists.
  • out/client/ is missing, which is actually where some of the code is - and the error that we are seeing?

Unless moving to Open VSX (https://github.com/cdr/code-server/pull/4319) will indeed come with 3.12.1 (and even depending on the release date), there likely still is some work to do to ensure the extension vended in code-server’s current gallery is complete…

I would recommend to re-upload a working extension to code-server’s VSX gallery, either by taking it from Open VSX or GitHub, or building it locally? I’m happy to provide a version that I’d build myself so you can upload it?

@0x0L As per the matrix I created here the only working version of ms-toolsai.jupyter are the ones downloaded from Open VSX or GitHub build artifacts. The ones vended by the current gallery won’t work.

If you don’t want to completely switch to Open VSX, I reckon the following should work in a Dockerfile - just to install the extensions?

RUN SERVICE_URL="https://open-vsx.org/vscode/gallery" ITEM_URL="https://open-vsx.org/vscode/item" code-server --install-extension ms-python.python
RUN SERVICE_URL="https://open-vsx.org/vscode/gallery" ITEM_URL="https://open-vsx.org/vscode/item" code-server --install-extension ms-toolsai.jupyter
1reaction
0x0Lcommented, Oct 17, 2021

Thanks @edvincent for your matrix. I used the extensions from the official market place as a temporary fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Jupyter Notebook: A Beginner's Tutorial - Dataquest
The easiest way for a beginner to get started with Jupyter Notebooks is by installing Anaconda. Anaconda is the most widely used Python...
Read more >
How to Write Documentation with Jupyter - Packt Hub
The Jupyter notebook is an interactive notebook allowing you to write documents with embedded code, and execute this code on the fly.
Read more >
Jupyter Notebook 6.5.2 documentation - Read the Docs
You can create new notebooks from the dashboard with the New Notebook button, or open existing ones by clicking on their name. You...
Read more >
Create, Document, and Share Live Code Examples with ...
Enter Jupyter Notebook, an interactive way of documenting and executing live code from a web-based interface. It runs as an interactive web ...
Read more >
15 Tips and Tricks for Jupyter Notebook that will ease your ...
Jupyter Notebook can show that documentation of the function you are calling. Press Shift+Tab to view the documentation. This is very helpful as ......
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