jupyterlite / xeus-python-demo

JupyterLite template repository with xeus-python as default kernel
https://jupyterlite.github.io/xeus-python-demo/
53 stars 14 forks source link

Install of extra packages not working: environment.yml not used? #25

Closed taylorgibson closed 1 year ago

taylorgibson commented 1 year ago

Description

It doesn't appear that adding libraries to the environment.yml file pre-installs extra packages to the environment as intended.

Reproduce

  1. Add a library (e.g. pandas) to the environment.yml file
  2. Wait for github actions to complete
  3. Attempt to import library (e.g. import pandas as pd)
  4. See error, ModuleNotFoundError: No module named 'pandas'

Expected behavior

This should load the library as intended and outlined in README.md and @jtpio's Jupytercon video.

Context

jtpio commented 1 year ago

Thanks @taylorgibson for reporting the issue :+1:

Maybe it's because jupyterlite-xeus-python is capped to <0.9.0 and some underlying dependencies (empack) have changed in the meantime:

https://github.com/jupyterlite/xeus-python-demo/blob/13dd65394424fb9cf07a622fde1524d9e6f5a970/build-environment.yml#L10

Would you be able to update to the latest 0.9.2 release of jupyterlite-xeus-python to check if that fixes the issue?

jtpio commented 1 year ago

I updated the version of jupyterlite-xeus-python in https://github.com/jupyterlite/xeus-python-demo/pull/26, if you would like to apply the same change to your deployment.

taylorgibson commented 1 year ago

I can confirm that this now allows packages to be installed. Thanks!

jtpio commented 1 year ago

Great, thanks for checking!

parthi2929 commented 7 months ago

For my repo, created from latest, its the below and still no package in environment.yml gets installed.

build-environment.yml

name: build-env
channels:
  - conda-forge
dependencies:
  - python
  - pip
  - jupyter_server
  - jupyterlite-core >=0.2.0,<0.3.0
  - jupyterlite-xeus>=0.1.2,<0.2

environment.yml

name: xeus-python-kernel
channels:
  - https://repo.mamba.pm/emscripten-forge
  - conda-forge
dependencies:
  - xeus-python
  - ipycanvas
  - matplotlib
  - pandas
  - networkx
  - ipywidgets
  - pyvis

I still get none of above including pandas not detected in browser jupyter lite, notebook.

image