jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.75k stars 568 forks source link

lxml_clean_html dependency issue in nbconvert lower version (6.5.1) #2148

Open sjkim2322 opened 6 months ago

sjkim2322 commented 6 months ago

from version 7.1.0, the lxml dependency has been removed, so this issue is unlikely to occur.

but In my case, I am using elyra, and the version of nbconvert used by elyra is fixed to 6.5.1.

The install requirement for nbconvert version 6.5.1 does not specify the lxml version.

lxml requires the lxml_html_clean dependency starting from version 5.2.0.

I can additionally install the lxml_html_clean module myself, but as mentioned above, I am using elyra and it is not easy to install additional modules.

Therefore, I would like to ask if there is an easy way to solve this problem in nbconvert.

takluyver commented 3 months ago

It looks like Elyra is pinning one specific version of nbconvert. The dependencies of an existing version can't be changed, so even if this was fixed for 6.5.x it would get a new version number and need a change in Elyra.

Normally, if you pin dependencies to very specific versions, you also pin transient dependencies to avoid just this kind of issue from newer versions of transient dependencies. There are tools that can help manage that, like pip-tools which works with familiar requirements.txt files, or poetry which has its own lock file format.