Skip to content
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

Jupyter Notebook #5273

Open
1 task done
fdionisi opened this issue Jul 22, 2022 · 95 comments
Open
1 task done

Jupyter Notebook #5273

fdionisi opened this issue Jul 22, 2022 · 95 comments
Labels
design: in progress Design has started on this issue. enhancement [core label] repl repl, jupyter, notebooks, etc

Comments

@fdionisi
Copy link
Contributor

Check for existing issues

  • Completed

Is your feature request related to a problem?

I'm not sure "Feature Request" is the right thing to do, but I think this is a bit more than just a syntax highlight + LSP.

Every now and then, I go back to VS Code to work with Jupyter notebooks, and it would be nice to stay on Zed (+ collaboration 😙👌).
This task is probably a monumental one, as it also involves a different buffer view and possibly something that could be done by the community (?), but I still want to put it on the radar.

Describe the solution you'd like

It would be great to open Jupyter notebooks directly in Zed and be able to interact with it (adding new blocks, running code, etc.), similarly to what VS Code does.

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot 2022-07-22 at 10 44 53

@mikayla-maki mikayla-maki added the design [core label] label Aug 5, 2022
@anarchy89
Copy link

Is jupyter support with the ability to run the cells going to be implemented ?

@hovsater hovsater added the potential extension Functionality that could be implemented as an extension (consider moving to community extensions) label Apr 30, 2023
@gabrielalexandrelopes
Copy link

I would suggest Hydrogen's approach to interface with Jupyter local or remote kernals: https://github.com/nteract/hydrogen

@Tom-Boscher
Copy link
Contributor

I would suggest Hydrogen's approach to interface with Jupyter local or remote kernals: https://github.com/nteract/hydrogen

Hydrogen is definitely a killer feature, it was really awesome to use Hydrogen in Atom!
I would love to see it in Zed.

@mcioffi
Copy link

mcioffi commented Oct 27, 2023

Jupyter notebook support would open up a huge community in Zed, I would certainly be part of the bandwagon if Zed introduced it

@mcioffi
Copy link

mcioffi commented Jan 20, 2024

@mikayla-maki @JosephTLyons, reading the "room temperature gauge" of the data science community, the interest is pretty strong in Zed, generally speaking, re: (zed-industries/extensions#157) , (zed-industries/extensions#136), & (zed-industries/extensions#145) ... doing a first take on jupyter integration with already supported Python in Zed might pave the way for the community for a future feature

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@noahgsolomon
Copy link

The only reason I haven't moved to Zed is because Jupyter notebooks aren't supported. I'd love to see this :0

@mertdeveci5
Copy link

Is there an ETA for compatibility here?

@Tom-Boscher
Copy link
Contributor

Tom-Boscher commented Feb 12, 2024

I'm looking for people to start working on a integration of nteract Jupyter but I'm a really Rust beginner.

@sa-
Copy link

sa- commented Feb 16, 2024

VS Code created some incompatibilities when trying to implement their own version of the notebook frontend resulting in some plotting libraries & widgets not working - among other inconveniences.

I'm not sure if this is possible, but maybe the jupyter installed in the venv could be used to render the notebook?

@gluonfield
Copy link

Jupyter notebook support would bring large number of new users to try out Zed. There's probably no other feature with potential to bring so many users.

@nikhilvishwanath
Copy link

I would love to use zed for all of my work but because jupyter notebook is not present not moved to zed fully. it is difficult to go back and forth from vs code to zed.

@ouj
Copy link

ouj commented Feb 26, 2024

I just installed Zed this morning and love the style and speed,

but after finding that Notebook is not supported...

I have to go back to VSCode.

@RehmatSChawla
Copy link

Ipython notebooks are also an essential part of how many academics (in Physics, Chemistry, Biology, etc) interact with programming, data analysis and presentation. It would definitely be necessary to incorporate ipython notebooks to make the switch to Zed viable for any of them.

@athakur569
Copy link

installed Zed. super impressed. found out ipynb not supported. disappointed. back to VS. that was quick. LOL

@JosephTLyons
Copy link
Collaborator

Hang in tight! We're working with a contractor to build some of this out!

@Tom-Boscher
Copy link
Contributor

@JosephTLyons That's an awesome news!!

@Tom-Boscher
Copy link
Contributor

Btw, I saw that Nteract is working on a new version of their Jupyter notebook, using Rust and TypeScript. https://github.com/nteract/nteract-next

@rgbkrk
Copy link
Member

rgbkrk commented Mar 14, 2024

Hi! 👋 I'm one of the nteract leads and now working on Zed support for notebooks. I'm prioritizing notebook support in Zed above the nteract-next work.

@adammenges
Copy link

@rgbkrk so excited for this 😄

@geoqiao
Copy link

geoqiao commented Mar 24, 2024

Not having integrated jupyter notebooks is the only thing that prevents me from using zed. Glad to hear about the progress!

@CrageJ
Copy link

CrageJ commented Sep 2, 2024

adding a project.toml to the root of the project does not solve your issue to point to the correct environment?

Yes, my problem did get solved by following https://github.com/zed-industries/zed/blob/main/docs/src/languages/python.md.

pyrightconfig.json really feels like it should have a command palette option for automatic generation.

@cvanelteren
Copy link

@CrageJ I believe Zed aim to look for $CONDA_PREFIX. If you are using nushell (like me) then that is not available until after you activate any environment. You can see if you can activate a base empty before running it to make Zed find it.

@andaag
Copy link

andaag commented Sep 3, 2024

adding a project.toml to the root of the project does not solve your issue to point to the correct environment?

Yes, my problem did get solved by following https://github.com/zed-industries/zed/blob/main/docs/src/languages/python.md.

So your REPL started working because you added a config for pyright? Mine did not.. and I really wouldn't expect it to either.

I do not have this working at all with a .venv file in the current directory, and I don't really want to change that pattern and install anything globally/before I started zed. That feels quite hacky (and I'm working on repos shared between many engineers, so it needs to be somewhat cleanly applicable).

@andaag
Copy link

andaag commented Sep 3, 2024

pub async fn kernel_specifications(fs: Arc<dyn Fs>) -> Result<Vec<KernelSpecification>> {

I patched this locally to also check .venv, which worked, but to make that clean I wanted to get the context and check the current project directory + .venv dir, so I got a bit stuck on this.

(On a side note, overall easy codebase to work with, but I ran out of time for patches I can build during lunch 😂 )

@CrageJ
Copy link

CrageJ commented Sep 3, 2024

adding a project.toml to the root of the project does not solve your issue to point to the correct environment?

Yes, my problem did get solved by following https://github.com/zed-industries/zed/blob/main/docs/src/languages/python.md.

So your REPL started working because you added a config for pyright? Mine did not.. and I really wouldn't expect it to either.

I do not have this working at all with a .venv file in the current directory, and I don't really want to change that pattern and install anything globally/before I started zed. That feels quite hacky (and I'm working on repos shared between many engineers, so it needs to be somewhat cleanly applicable).

Yeah, adding the pyrightconfig file with venvPath and venv was what solved the issue for me (this was for a poetry installation, so I fetched env with poetry env info). I had followed the instructions for REPL installation in the docs up until that point. Super annoying pyrightconfig wasn't mentioned in the docs.

@hanupratap
Copy link

Will we at some point have the same interface for jupyter notebooks... [where] upon executing a cell a new one is created

I fully expect we'll make a dedicated jupyter notebook editor that behaves like a regular notebook and reads/writes a .ipynb file. The current inline REPL was something we could get out there much more rapidly that mirrored an experience we had in Atom via Hydrogen.

hello - just checking if we have any timeline on this?

@datacubeR
Copy link

I can't wait to see Jupyter Notebooks implemented here and move away from VSCode forever ❤️.

@safwansamsudeen
Copy link

+1 for this, wanna get away from VSC ASAP.

@phromo
Copy link

phromo commented Oct 14, 2024

I feel jupyter notebook support is in a bit of a weird state in Zed right now, and I don't know if you are considering yourself done, if you have a roadmap etc. The unclarity makes it hard to know whether I should create issues for remaining features/UX-polish, or whether to comment here, or be silent, etc etc etc.

@schoukah
Copy link

++1 ! This is also what I'm waiting for to permanently get out of VS Code.

@iamnbutler
Copy link
Member

I feel jupyter notebook support is in a bit of a weird state in Zed right now, and I don't know if you are considering yourself done, if you have a roadmap etc. The unclarity makes it hard to know whether I should create issues for remaining features/UX-polish, or whether to comment here, or be silent, etc etc etc.

Formal notebook support doesn't exist in Zed yet, but we have designs & some early planning started. More info soon!

@iamnbutler iamnbutler added design: in progress Design has started on this issue. and removed design [core label] labels Oct 15, 2024
@rgbkrk
Copy link
Member

rgbkrk commented Oct 16, 2024

hard to know whether I should create issues for remaining features/UX-polish, or whether to comment here

If it's for the inline REPL, feel free to create issues that aren't already covered. For notebook/.ipynb support, that'll have to wait as there's already this issue and its being worked on.

@lhutyra
Copy link

lhutyra commented Oct 29, 2024

Wow I can see already draft PR!
#19756
and quick demo:

#19756 (comment)

Nice

@hanupratap
Copy link

Great news! I noticed it has been merged into the main branch. Any idea when it's going to be available for us to use?

@stormasm
Copy link
Contributor

Great news! I noticed it has been merged into the main branch. Any idea when it's going to be available for us to use?

Zed usually publishes out their releases on Wednesday so stage 1 is preview and then the actual release follows...

@pantheraleo-7
Copy link
Contributor

pantheraleo-7 commented Oct 31, 2024

PR#19756 has been merged to the v0.160.x release branch, and is available in the latest pre-releases (behind a feature flag). Since it's in very early stages of development, a stable release with notebook support is at least a week or two away.

@PhenomenaPh
Copy link

Hello! Thank you for the implementation. Should we wait for this feature in the next stable release?

@Muthukamalan
Copy link

please add small widget to prefer kernels

@HeMuling
Copy link

HeMuling commented Nov 19, 2024

Is jupyter notebook support in latest release?

@arthur-gtgn
Copy link

Is jupyter notebook support in latest release?

Doesn't seem so. According to earlier comments it should arrive in the coming weeks.

@lhutyra
Copy link

lhutyra commented Nov 19, 2024 via email

@rgbkrk
Copy link
Member

rgbkrk commented Nov 19, 2024

Probably not going to see fully featured notebooks until early next year. The rest of the Zed team is working on git support amongst other features for the rest of the year. I will be progressing on notebooks here and there, but no big promises at this time.

@datacubeR
Copy link

Happy new year!! Eager to see any updates on this 🎉🎉🎉

Have a nice day 🤗

@lukebelz
Copy link

Also looking forward to any updates. I'm going between different IDEs right now to find the right one for me, and none of them check all of the boxes. Zed has everything BUT jupyter notebooks.

@noverby
Copy link

noverby commented Feb 7, 2025

@deathblade287 Please just upvote the issue. You are triggering a notification to everyone subscribed to the issue, when you comment.

@gjmveloso
Copy link

I just tried to use this in conjunction with mise and uv, following uv's instructions for VSCode and it didn't worked.

Apparently Zed currently does not support ipykernel coming from uv managed venv, is that right?

 bat mise.toml
───────┬────────────────────────────────────────────────────────────────────────────────
       │ File: mise.toml
───────┼────────────────────────────────────────────────────────────────────────────────
   1   │ [tools]
   2   │ python = "latest"
   3   │
   4   │ [env]
   5   │ LOCAL_NOTEBOOK_DEV = 1
 uv pip list
Package           Version
----------------- -----------
appnope           0.1.4
asttokens         3.0.0
comm              0.2.2
debugpy           1.8.12
decorator         5.1.1
executing         2.2.0
ipykernel         6.29.5
ipython           8.32.0
jedi              0.19.2
jupyter-client    8.6.3
jupyter-core      5.7.2
matplotlib-inline 0.1.7
nest-asyncio      1.6.0
packaging         24.2
parso             0.8.4
pexpect           4.9.0
platformdirs      4.3.6
prompt-toolkit    3.0.50
psutil            6.1.1
ptyprocess        0.7.0
pure-eval         0.2.3
pygments          2.19.1
python-dateutil   2.9.0.post0
pyzmq             26.2.1
six               1.17.0
stack-data        0.6.3
tornado           6.4.2
traitlets         5.14.3
wcwidth           0.2.13

zed .
repl: sessions

Screenshot 2025-02-12 at 8 04 53 AM

@phromo
Copy link

phromo commented Feb 12, 2025

Vscode probably autodetects venv folder and the ipykernel module. You will need to follow the less magic path with zed see https://docs.astral.sh/uv/guides/integration/jupyter/#creating-a-kernel

Apparently Zed currently doe not support ipykernel coming from uv managed venv, is that right?

Put otherwise, there is nothing special with an uv-installed ipykernel -- it works in zed. You are correct in that zed does not have the same automagics as vscode for detecting it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design: in progress Design has started on this issue. enhancement [core label] repl repl, jupyter, notebooks, etc
Projects
None yet
Development

No branches or pull requests