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

jupytext and jupyter lite ? #1225

Open
parmentelat opened this issue Apr 25, 2024 · 5 comments
Open

jupytext and jupyter lite ? #1225

parmentelat opened this issue Apr 25, 2024 · 5 comments

Comments

@parmentelat
Copy link
Contributor

Hi; I am currently experimenting with jupyter lite, and found that jupytext apparently does not work in this context at the moment

I am curious to hear of others who would have this interest too, to share experiences and possibly best practices

@mwouts
Copy link
Owner

mwouts commented Apr 27, 2024

Hi @parmentelat , thanks for opening this thread. I see are at least two difficulties for providing the current Jupytext in Jupyter Lite
a) The context manager for Jupyter Lite seems to be very different from the Jupyter Lab one (e.g. it's coded in Javascript, while Jupytext's contents manager is written in Python)
b) I don't know how to distribute a Python package for pyodide. I tried

import pyodide_js
await pyodide_js.loadPackage('jupytext')

but it failed with the following error: JsException: Error: No known package with name 'jupytext'

Possibly it would make sense to code another converter from scratch in TypeScript, but I am afraid I don't have the skills nor the time to do so. @jtpio do you have any thoughts on the subject?

@parmentelat
Copy link
Contributor Author

Hey @mwouts - hope you're doing fine

well, as far as skills I am unfortunately not the right person either :)

I was just raising this because I thought I might not be the only jupytext addict to start playing with jupyterlite, given that it is becoming a more and more viable and appealing option...

@nthiery
Copy link
Contributor

nthiery commented May 20, 2024

Same here: can't wait to have jupytext in jupyterlite. IIRC from last time I tried, it's not far from working:
using the conda-based jupyterlite xeus, I could just pull jupytext
by listing it in the pip dependencies in the environment. And then I could open a markdown notebook
with Open With.

@nthiery
Copy link
Contributor

nthiery commented May 20, 2024

@ValMystletainn
Copy link

Same here: can't wait to have jupytext in jupyterlite. IIRC from last time I tried, it's not far from working: using the conda-based jupyterlite xeus, I could just pull jupytext by listing it in the pip dependencies in the environment. And then I could open a markdown notebook with Open With.

I'm tring to use jupytext in jupyter lite too. But I have failed to do so. So I want to check the opearation with you. What I have doen is

  1. create an environment.yaml and put the xeus-python, jupytext into it's dependency
  2. do jupyter lite build --XeusAddon.environment_file=./environment.yaml to build the jupyterlite bundle with xeus and jupytext init
  3. run jupyter lite serve to push the jupyter lite into localhost server.
  4. visit the corresponding address. I have got the jupytext customized pages, but when I right click the .md file or .py file and open it with jupytext notebook, I still got the json error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants