holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 34 forks source link

missing astropy in build 189 #239

Open route2021 opened 2 years ago

route2021 commented 2 years ago

After installing build 189 I am missing astropy !

holzschu commented 2 years ago

I'm going to have a look. I guess the automatic install script has failed silently. Is the error message providing information?

route2021 commented 2 years ago

import astropy -> ModuleNotFoundError: No module named 'astropy'

and not listed with !pip list

holzschu commented 2 years ago

Oh, this one is interesting. astropy has a dependency on jinja2, jinja2 has a line that says: from markupsafe import Markup, escape, soft_unicode.

Except markupsafe 2.1.0 has removed soft_unicode, so this line breaks.

But astropy does not actually require jinja2, and they've removed it from the build requirements: https://github.com/astropy/astropy/commit/8f6ab831fb8c44d8758318faa890aaaa4cb5ac25 https://github.com/astropy/astropy/commit/87e73fababde2e2576e1255de0ca45f213079683 (so the version on the repository would build, but not the one from pip)

The incompatibility between markupsafe and jinja2 is one of the most discussed questions over at jinja2 (and their pinned issue): https://github.com/pallets/jinja/issues/1585

So, my options seem to be:

I'll probably go for option 2.

holzschu commented 2 years ago

Okay, that's more subtle than that. I already have the right version of jinja2, but because astropy listed jinja2==2.10.3 as a requirement, pip install pulls the outdated version of jinja2 and that is what breaks the install.

I forgot about option 2b: download the source, fix the source with a patch, build and install.

route2021 commented 2 years ago

Thanks, it seems to work! You are doing a good job!

holzschu commented 2 years ago

And the virtual environment issue from #230 should also be fixed.