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 · 79 comments
Open
1 task done

Jupyter Notebook #5273

fdionisi opened this issue Jul 22, 2022 · 79 comments
Labels
design: in progress Design has started on this issue. enhancement [core label] jupyter repl, 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

@fdionisi fdionisi added enhancement [core label] triage Maintainer needs to classify the issue labels Jul 22, 2022
@JosephTLyons JosephTLyons removed the triage Maintainer needs to classify the issue label Jul 22, 2022
@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:/nteract/hydrogen

@Tom-Boscher
Copy link
Contributor

I would suggest Hydrogen's approach to interface with Jupyter local or remote kernals: https:/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?

@AugustDev
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:/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!

@cvanelteren
Copy link

cvanelteren commented Jul 28, 2024

Apologies @rgbkrk , I wasn't clear before. I have jupyter installed within my venv (using micromamba) and I suspect that zed is looking for jupyter in my path -- which it isn't since it is only present in that particular venv. For me to run jupyter in emacs I first activate my base env and then can access jupyter. I am looking for away to point Zed's repl towards where jupyter is available.

@rgbkrk
Copy link
Member

rgbkrk commented Jul 28, 2024

If you run python -m ipykernel install --user --name micro --display-name "Micro Mamba Python 3", then it will install the kernel in a way that Zed will launch it within your environment. Zed does not use jupyter's CLI to pick up the kernelspec info, we rely on detecting a kernel installed into /Users/username/Library/Jupyter/kernels/ and other known paths.

Happy to hop on a call to help you out and make sure we've got this working for conda/mamba env users. While I did a little bit of conda env detection, it seems not to be working on your system. Book time here: https://calendar.app.google/b9rxqhC1zV628uwZ6

@cvanelteren
Copy link

cvanelteren commented Jul 28, 2024

I thin we are talking past each other. I am using micromamba which is a package manager (basically think conda but fast). On linux, you generally don't install packages directly using the python available to the system, since some linux packages use python for their services. Jupyter is installed within a env that I need to activate for jupyter to become part of my path. I would like to point zed to my venvs to extract the proper jupyter (and python for that matter), how can I point it to pick it up. The docs are really obscure as to /how/ they pickup jupyter.

To make it concrete, in one of my envs I have jupyter installed in several environments under

find ~/micromamba/ -name "jupyter" | grep -E "bin/jupyter"
....
/home/casper/micromamba/envs/proplot-dev/bin/jupyter
/home/casper/micromamba/envs/boiler/bin/jupyter
... [etc]

So what I am asking for, can I somehow pass on the venv location?

Also for posterity; yes I did try activating an env with jupyter before running Zed -- Zed doesn't pick it up.

@rgbkrk
Copy link
Member

rgbkrk commented Jul 28, 2024

There is not currently a way to pass on the venv location to Zed. Please make a new issue for this.

@CJonesANU
Copy link

CJonesANU commented Aug 1, 2024

I am just adding my voice to the crowd. Notebook support is crucial to my workflow as an academic. Without it I cannot switch to Zed, even as impressed as I am with the other features. :)

@LittleFat3Tuan
Copy link

The newly released REPL is already a game changer indeed. Excellent jobs! But would also love to see more support on .ipynb files. Currently .ipynb files are rendered raw in Zed.

@cvanelteren
Copy link

@LittleFat3Tuan that is because this is a repl not direct implementation of jupyter.

@LittleFat3Tuan
Copy link

@cvanelteren I understand that. What I was saying was, with REPL at hand, we're just a few steps away from having a fully supported notebook feature.

@KasselMarc
Copy link

Just so that I understand it correctly: Will we at some point have the same interface for jupyter notebooks as in VS Code, in that upon executing a cell a new one is created or will it always be the case that one has to use # %% in order to mark the beginning of a cell?

@rgbkrk
Copy link
Member

rgbkrk commented Aug 12, 2024

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.

@micsama

This comment was marked as spam.

@gabrielalexandrelopes
Copy link

@rgbkrk thank you for this REPL implementation, its awesome!

@CrageJ
Copy link

CrageJ commented Sep 2, 2024

It would be nice for a few kernel operations to be available via the command palette. In particular, i'm missing the Python: Select Interpreter command from VScode, which allows me to select the kernel to use for the notebook/repl. Currently having issues with actually using the right kernel, even though it is being detected by Zed.

@cvanelteren
Copy link

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

@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:/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:/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:/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
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] jupyter repl, etc
Projects
None yet
Development

No branches or pull requests