I love Python, I love Jupyter notebooks, and I love Cursor. The problem is that Cursor is not nearly as good with Jupyter notebooks as it is with plain python files. Do you have any tips that can make working with Jupyter notebooks in Cursor better?
The two main problems for me with Jupyter notebooks:
- Agent mode can’t edit
- Sometimes new cells bug out and look blank
Waiting for a fix on (2), but I think there are some good ways to work around (1). Move all your functions to a .py file and run agent mode or edits there. Make sure to have the following cell in your notebook so it automatically reloads functions:
%load_ext autoreload
%autoreload 2
One other tip, if you have a really messy notebook, potentially with lots of graphs, and want to get organized, is to make a copy of your notebook in markdown and use that for model context:
jupyter nbconvert --to markdown <your file>.ipynb
Hey, currently, Cursor doesn’t support ipynb files, but we might add this feature in the future. In the meantime, you can vote for this feature here:
I see Jupyter support was added in 1.0 - but it’s… rough. Really.
I regularly am losing just basic out of the box functionality from vscode when using cursor for notebooks. For example, I have a new notebook, the first cell is full of imports, I run it, no issues. Next cell uses some of the imports - everything is red lined saying undefined. None of the info the editor should have about the functions and their params is there. I can run the cell no issues, code works, libraries are there.
This is just way worse than using copilot or something in normal vscode. @deanrie - the feature request you linked shows notebooks are supported now - but are they? This is unusable.