jupyterlite / pyodide-kernel

Python kernel for JupyterLite powered by Pyodide
https://jupyterlite-pyodide-kernel.readthedocs.io/en/latest/_static/
BSD 3-Clause "New" or "Revised" License
46 stars 25 forks source link

List packages that are unavailable in jupyterlite environment #140

Open paddymul opened 5 days ago

paddymul commented 5 days ago

Problem

I am tyring to make my package compatible with jupyterlite. There are core python packages that my package raw imports that aren't available in jupyter lite. I realize this is a probably a kernel specific problem.

So far I have run into errors importing psutil and packaging. I can fix this by wrapping the imports in try/except, but having to build a new version of my library each time is cumbersome.

Proposed Solution

At a minimum a list of all python core modules that aren't available in jupyterlite would be helpful. Maybe a line in developer docs with a `find -type f ./module_py_root | grep py$ | xargs grep -E '(psutil|packaging)' | grep import" to show library maintainers all relevant lines to look at.

I don't know if there is a way to add this as a ruff check.

Additional context

jtpio commented 4 days ago

Thanks @paddymul for opening the issue :+1:

Yes that would be useful.

Linking to https://github.com/jupyterlite/jupyterlite/issues/967 for reference, as this was also discussed there.