Dependency issue when launching binder
idomic opened this issue · comments
Ido M commented
Seems there are some issues when launching the binder image:
Done! Activate your environment with:
conda activate projects
Enabling: nbgitpuller
- Writing config: /srv/conda/envs/notebook/etc/jupyter
- Validating...
nbgitpuller 1.1.1 OK
Loading pipeline...
Traceback (most recent call last):
File "/srv/conda/envs/notebook/bin/ploomber", line 8, in <module>
sys.exit(cmd_router())
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/ploomber_cli/cli.py", line 301, in cmd_router
from ploomber import cli as cli_module
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/ploomber/__init__.py", line 2, in <module>
from ploomber.dag.dag import DAG
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/ploomber/dag/dag.py", line 97, in <module>
from ploomber.dag.dagclients import DAGClients
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/ploomber/dag/dagclients.py", line 4, in <module>
from ploomber.tasks.abc import Task
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/ploomber/tasks/__init__.py", line 17, in <module>
from ploomber.tasks.notebook import NotebookRunner, ScriptRunner
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/ploomber/tasks/notebook.py", line 13, in <module>
import nbconvert
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbconvert/__init__.py", line 4, in <module>
from .exporters import *
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbconvert/exporters/__init__.py", line 3, in <module>
from .html import HTMLExporter
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbconvert/exporters/html.py", line 14, in <module>
from jinja2 import contextfilter
ImportError: cannot import name 'contextfilter' from 'jinja2' (/srv/conda/envs/notebook/lib/python3.9/site-packages/jinja2/__init__.py)
Removing intermediate container a5f4bef6318d
The command '/bin/sh -c ./postBuild' returned a non-zero code: 1Built image, launching...
Eduardo Blancas commented
can you share the binder link that led to this issue? different repositories launch different environments, so I need the link to understand where the error comes from.
but based on the traceback, it seems like this is due to an incompatibility between nbconvert and jinja2
Ido M commented
Eduardo Blancas commented
I upgraded from Python 3.9 -> 3.10 and it now works. it was an nbconvert imcompatibility.