-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run jupyter kernel using python extension #3874
Comments
Thanks for opening the issue! I have never used jupyter notebooks. Is it possible for you to update the repro steps? What do I need to install or how can I create a new jupyter notebook? Then I can try to reproduce locally and see how we can help you. Thanks! |
Updated, thanks for coming back to me :) I thought "everyone" had this workflow, because it is such a good one ;) |
Thanks @simeneide for working with me (Python/Jupyter noob here). That was very easy to follow and I received the same error as you. I can't promise when we will get to this but I will add it to the next cycle and label it as high-priority. Video(Apologies in advance if I pronounced your name wrong) Screen.Recording.2021-07-30.at.10.40.27.AM.mov |
@simeneide the installed jupyter extension facilitates VS Code to interface with jupyter package installed in your env, it doesnt install jupyter notebook to your current environment. I would be happy if you could confirm that the python environment you are using has got jupyter installed. |
Yes, all has and I am also able to start jupyter notebook. Currently using 3.11.0 as that is the latest found in brew (which is used when installing with the script). However, it fails much before it starts connecting to the jupyter kernel (as seen in video), so unsure if this is the problem. Are you not able to reproduce my steps? Alternatively, can you provide a step-by-step of how you get your setup to work? Also: My steps above are working on 3.10, so something has happened. |
@simeneide i doubt whether your jupyter installation is in path. there could be few more possibilities pertaining to this error. ping me at ji.balajib[at]gmail.com lets connect remote and debug. Im happy to help i think this way its going to be quick and then post back solution here. this could help @jsjoeio close few more issues. |
Thanks for the notes @gogobd!
It's in the next milestone (3.12) so it will get worked on soon and should come in the next version. We have a couple competing priorities and an off-site this week so I can't promise when but keep an eye out! |
Do you know what is missing, @jsjoeio? Otherwise I am pretty sure I can cook up a simple docker image to reproduce this so that you can have a look, @balajib-b. |
I think I just need to dig into VS Code and figure out where I'm not too familiar with how native VS Code commands/extensions get loaded but I'm guessing the issue lies there. So maybe it's not being included in code-server's latest version for some reason 🤔 @code-asher may have some pro tips for debugging too, but this is where I would start. (Thanks for asking and offering to help though @simeneide super appreciated |
that would be sufficient @simeneide , send me the yaml. |
Have you tried Anaconda3 and Jupyter built inside Anaconda3? |
Slightly older versions of the vscode-python and vscode-jupyter, i.e. the latest versions still compatible with vscode 1.57 seem to work out of the box. |
Assuming older versions of the extension work my guess is the extension
was updated and our marketplace had a snafu building the new extension
(as it seems to every time). Since we haven't switched to Open VSX yet
and we don't have a way to force the marketplace to stop updating
extensions automatically we may need to build it manually and overwrite
it (again...).
|
Hi, I am having the same issue with
=> Is there's somewhere a compatibility matrix of the code-server / VS Code / ms-toolsai versions to be used together and that are known to be functional ? Thx ! |
I do not think we have anything like that unfortunately. We have some
comments about working versions but that is about it. Here are a few:
#3782 (comment)
#2929 (comment)
#2341 (comment)
#2341 (comment)
|
https://open-vsx.org/extension/ms-toolsai/jupyter/2021.8.12 plus https://open-vsx.org/extension/ms-python/python/2021.9.1218897484 are working fine with v3.12.0 on Debian 11 (Bullseye). |
Thank you, @benz0li for mentioning this here, I can confirm! I use docker to set up cdr code server and that's the first time in a long time this was working again:
|
i just installed 3.12 clean (deleted all cache and configs) and still have the issue on ubuntu 20.04 lts. |
Again, thanks for looking into this. Although many similar comments, I can neither get this to work for 3.12. |
Here's a matrix table with links for those who want it working. The bottomline being: you can't use marketplace from code-server itself. You either need to manually download, drag-and-drop and install; or do something equivalent.
@jsjoeio What's the best way to help here? Build a working version myself and send it over? Try and figure out how to edit the current command so the process starts working again? Can we make your scraper use the build artifacts from their CI/CD releases? Try to engage the maintainers to put the link directly to the VSIX in their releases? Can we re-upload to coder's marketplace the VSIX from Open VSX? |
Thanks @edvincent for posting the matrix and offering to help! To be honest, the hardest part is finding time. I'm the only maintainer working full-time on code-server and I'm trying to juggle all the issues we have. My current priorities are improving the release process (see milestone). I've added this issue there as well but haven't been able to dive in yet.
Thank you for asking that! Well...we completely refactored how VS Code exists in the code-server codebase and it's in a funky place right now so it wouldn't be easy to get you into the codebase trying to edit the current command (we're lacking documentation cc @TeffenEllis).
Maybe? I'm not super familiar with this part of our codebase yet and haven't had time to dive in.
You could try this! I don't think we've had much success in the past though 😢
If you have a working vsix file that works with the latest version of code-server and send that over here, that might be easy then for me to upload it to our marketplace 🤔 (at least I'm hopefully it's a simple CLI command to upload, I think it should be). Otherwise, hoping to dive in on this issue this week! Just gotta wrap up another thing |
@edvincent Why not use the OpenVSX Registry by default? Sooner or later this will be the default anyway. According to FAQ.md > How do I use my own extensions marketplace?: export SERVICE_URL=https://open-vsx.org/vscode/gallery
export ITEM_URL=https://open-vsx.org/vscode/item ℹ️ This is working fine for my builds. |
I'm going to start working on this issue and use this comment as a place to document my notes. I will update it as I find more information so as to not spam the issue. Try to Reproduce Issue LocallyThe first question is to see if this is still an issue. Here's how I'm going to try to reproduce it:
ExpectedA jupyter notebook starts up ActualCommand fails ✅ Confirmed. This issue still exists in code-server 3.12.0 Investigate Stack TraceBased on the error in the console and the stack trace, it looks like we're missing a module in our fork of VS Code (you can tell because the stack points to mainThreadExtensionService.ts:95 Activating extension 'ms-toolsai.jupyter' failed: Cannot find module '/Users/jp/Dev/repros/cs-3874/ms-toolsai.jupyter-2021.8.12/out/client/extension'
Require stack:
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/vs/loader.js
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/bootstrap-amd.js
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/bootstrap-fork.js. Well actually, It looks like it can't find the module in Let's go there and take a look... Well well JS, look who was right. There is no Thinking out loud here...that means when the VSIX was published (19 hours ago), it didn't include all the build files, specifically the
cd cs-3874/ms-toolsai.jupyter-2021.8.12/out/
mv client_renderer client
Nope! Same issue. I checked the contents of Compare Open VSX version to Release Asset versionLet's go look at the release assets from yesterday: https://github.com/microsoft/vscode-python/releases/tag/2021.9.1246542782 and download that We'll compare that to the one that we get from Open VSX to see if they're different or the same. Okay so this won't work exactly because here's what happens:
It only contains the Python extension which is open-source. What happens is you install this extension and it installs the extension pack which has Jupyter and Pylance (I assume both of those are closed-source). Install Jupyter VSIX build artifact fileWait, no, Jupyter is open-source? https://github.com/microsoft/vscode-jupyter/releases/tag/2021.8.12 I could have sworn it didn't use to be. Well the source code is published with the release so we could download, run the build scripts to output a Instead, I'm going to try downloading this That doesn't work 😢 ERR Unable to install extension 'ms-toolsai.jupyter' as it is not compatible with VS Code '1.60.0'.: Error: Unable to install extension 'ms-toolsai.jupyter' as it is not compatible with VS Code '1.60.0'.
at A.install (/usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/vs/server/entry.js:42:51324)
at processTicksAndRejections (internal/process/task_queues.js:95:5) (sidenote: I don't want to directly link the issue but it looks like this issue with the VSIX files has been raised in the Jupyter repo: microsoft _ vscode-jupyter _ issues_ 5582) Picking up here: I'm cloning the vscode-jupyter repo and following the build steps. I also want to look at the VS Code version 🤔 I think that error I got above is part of the reason why this won't work. code-server is running VS Code 1.60.0 and this version (or the latest version after cloning is: 1.61.0-insider I wonder if we change that to 1.60.0, then rebuild and install in code-server if it will work. It's interesting. They have this Weird...if I search in the repo for this script, I don't find it used anywhere 🤔 Building vscode-jupyter from source and changing VS Code version to match code-serverThat didn't work either! I was able to successfully install code-server but I ran into a new error mainThreadExtensionService.ts:95 Activating extension 'vscode.ipynb' failed: Cannot find module '/usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/extensions/ipynb/dist/ipynbMain.js'
Require stack:
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/vs/loader.js
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/bootstrap-amd.js I think this means we're going down the wrong rabbit hole. If you look at the stack-trace, it points back to I think I'm going to check with @TeffenEllis to see if she has any ideas what might be causing these issues. There's some trickiness to working on code-oss-dev/our VS Code fork locally, but I think that's where I'll need to start looking. Thanks for the patience everyone! Reproduce in Gitpod's forkThe next step is to see if this issue can be reproduced in Gitpod's VS Code fork. git clone https://github.com/gitpod-io/openvscode-server.git
yarn
yarn server:init
./resources/server/web.sh Well, good news. It works in Gitpod 🤔 I'm going to guess then this issue is specific to code-server's fork of VS Code. At least we can look at Gitpod's fork and see where ours diverges. I thought comparing would help but doesn't seem to tell us much 🤷♂️ coder/vscode@main...gitpod-io:main Reproducing locally in code-server + cdr/vscode# Make a directory with both projects
mkdir coder-oss && cd coder-oss
# Clone both repos
git clone https://github.com/cdr/code-server.git
git clone https://github.com/cdr/vscode.git
# Install dependencies in both
cd code-server && yarn install && cd ..
cd vscode && git checkout 1.60.0-code-server-patch && yarn install && cd ..
# Update code-server to point to local fork
cd code-server && cd vendor/modules
rm -r ./code-oss-dev
ls -s ../../../vscode ./code-oss-dev
# Run code-server
# make sure you're in /code-server
cd ../../
yarn watch Don't know if this is related. But inside Gitpod's, I see Both of them have the same Ironically, I'm stuck trying to get code-server working with my local fork 😅 Okay... I'm seeing this error mainThreadExtensionService.ts:95 Activating extension 'vscode.ipynb' failed: Cannot find module '/usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/extensions/ipynb/dist/ipynbMain.js'
Require stack:
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/vs/loader.js
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/bootstrap-amd.js
- /usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/bootstrap-fork.js. |
@jsjoeio Yes. This issue has only been resolved recently by microsoft/vscode-jupyter#5812, which allowed updating both Python and Jupyter extensions on OpenVSX to a current version. |
I installed with hombrew and we think the GOOOD NEWS!! I'm on macOS and I installed code-server with the standalone method: # install standalone method
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone
# Run code-server
~/.local/lib/code-server-3.12.0 --auth none
# install 2021.8.12 from Open VSX
# https://open-vsx.org/extension/ms-toolsai/jupyter/2021.8.12
# install extension into code-server
# Jupyter: Create new Blank Notebook So this works!!! We have narrowed down the error to the We think it might be because we changed it from |
Okay we figured it out by adding We should be running the Powershell doesn't have Will discuss more tomorrow |
This reverts commit b32b4ed. We are reverting this because we found out that while this fixes the postinstall on Windows, it breaks it on mac and other devices. See: #3874 (comment)
So should Jupyter now work after we update? |
Once 3.12.1 is out, yes! |
I have a (kind of) idea. Why not install Anaconda3? That has Jupyter Notebook built-in, so you can create a notebook from that, right?
|
nopes boy, error persists. |
according to @jsjoeio this will be fixed in 3.13 (separate issue). So Im waiting 😁 |
Wait I think it's 4.0.0, asked @jsjoeio two days ago and he said that it's straight to 4.0.0. |
This was the reply, so there's no 3.12.1 or 3.12.2. |
Yes! Jupyter kernel should be working in the next release (it was 3.12.1 but it will be 4.0.0) as @im-coder-lg mentioned! |
Hi, I downloaded 4.0.1 now and installed python+jupyter extensions. When starting a jupyter notebook I still get the Update: This was done on an ubuntu-machine, not macOS (as brew doesnt install 4.0.1 yet) |
Hmm @simeneide I just tested this the other day here and it worked as expected. Can you take a look at that comment? |
yes sorry @jsjoeio , in my update I note that when I deleted my old config files it ran smoothing. dont know why, but it runs well now :) |
@simeneide hooray! Well I'm happy it was easy as that :) Thanks for confirming so quickly. |
I upgraded to the latest code-server today and now the jupyter interactive functionality of the python extension has stopped working. This happens both when I did this using a remote linux machine (docker based on the pytorch 1.9 image), AND when installing code-server on my local macbook. When opening a jupyter notebook a popup with the following information appears:
Command 'Jupyter: Create New Blank Notebook' resulted in an error (command 'jupyter.createnewnotebook' not found)
OS/Web Information
code-server --version
: 3.11.0 4e8cd09Steps to Reproduce
On macos (m1):
install code-server using install script
install python extension (ms-python.python v2021.7.1060902895). This will also install a jupyter extension (ms-toolsai.jupyter v2021.6.832593372)
Try to open a new jupyter notebook (cmd+shift+p "Jupyter: Create new Blank Notebook")
The developer console has this error (which is too far in the deep for me to understand):
Expected
A jupyter notebook starts up
Actual
Error message
Command 'Jupyter: Create New Blank Notebook' resulted in an error (command 'jupyter.createnewnotebook' not found)
The text was updated successfully, but these errors were encountered: