Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing astropy in build 189 #239

Open
route2021 opened this issue Mar 8, 2022 · 6 comments
Open

missing astropy in build 189 #239

route2021 opened this issue Mar 8, 2022 · 6 comments

Comments

@route2021
Copy link

After installing build 189 I am missing astropy !

@holzschu
Copy link
Owner

holzschu commented Mar 8, 2022

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

@route2021
Copy link
Author

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

and not listed with !pip list

@holzschu
Copy link
Owner

holzschu commented Mar 8, 2022

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: astropy/astropy@8f6ab83
astropy/astropy@87e73fa
(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): pallets/jinja#1585

So, my options seem to be:

  • wait for astropy 5.0.2, with the fix
  • install astropy from the repository (instead of the version from pip)
  • figure out if I can replace jinja2 with Jinja
  • downgrade markupsafe to 2.0.1 (which still has soft_unicode)

I'll probably go for option 2.

@holzschu
Copy link
Owner

holzschu commented Mar 8, 2022

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
Copy link
Author

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

@holzschu
Copy link
Owner

holzschu commented Mar 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants