xeus-python-kernel icon indicating copy to clipboard operation
xeus-python-kernel copied to clipboard

Support `requirements.txt`

Open jtpio opened this issue 2 years ago • 1 comments

Problem

Currently jupyterlite-xeus-python supports reading dependencies from an environment.yml file which is great :+1:

However some folks new to Python and likely to use JupyterLite might not be familiar with the whole conda world of packages. This might not be an issue if they are just using an existing JupyterLite site. However it could become one if they want to build their own site.

Proposed Solution

Maybe the kernel addon could also support reading dependencies from a requirements.txt if available. And "translate" it to an environment.yml transparently before triggering the build.

This might need https://github.com/jupyterlite/xeus-python-kernel/pull/102 first, as not all packages on PyPI are available on conda-forge.

Additional context

This came up in discussions after the presentation about JupyterLite at a Python meetup: https://www.meetup.com/fr-FR/groupe-dutilisateurs-python-grenoble/events/291818929/

jtpio avatar Mar 31 '23 14:03 jtpio

An alternative would be to just document:

  • how to translate a requirements.txt to an environment.yml file
  • explain the differences between the two
  • explain what conda, conda-forge and escripten-forge are

jtpio avatar Mar 31 '23 15:03 jtpio