-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rework Install guide following on from #16555 #16987
Rework Install guide following on from #16555 #16987
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
So this supersedes #16555 ? |
That's the plan. |
|
||
Testing an Installed ``astropy`` | ||
================================ | ||
.. _installing-astropy-with-pip: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may have been discussed previously but I don't think I get the flow we're going for here: are we encouraging users to use conda and pip to install astropy ? This seems like a recipe for disaster. In fact, I happen to have a screenshot from an older version of astropy's documentation that explicitly warned against it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to create a vanilla conda environment with only Python and about a dozen other core packages that come along for the ride. After that, use pip
for everything. I think this is quite safe.
What might cause issues is installing astropy from conda and then upgrading with pip, or vice versa. But it's worth mentioning that I think conda has gotten better with this mixed-method installation, at least in my experience. I regularly pip-install packages over a conda version and haven't had any problems recently. That doesn't mean it can't happen, but it hasn't happened to me in the last ~5 years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This strategy is basically what's in the developer docs. Going all-in with pip
once the environment is created should minimize issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to create a vanilla conda environment with only Python and about a dozen other core packages that come along for the ride. After that, use pip for everything. I think this is quite safe.
In my experience people tend to follow instructions for environment creation and stick with those envs, so I'm not sure it's safe to assume that the only evolution that their env will see is what our instructions guide them through.
But in general I don't think conda solves any of my problems, hence I'm not comfortable with recommending anything other than pip (and maybe uv
these days but I wouldn't through that one at a beginner yet). In short: I'm not sure I can help with this conversation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in general I don't think conda solves any of my problems
Conda has solved these problems for me:
- Installing any version of Python on Mac (or any of our supported platforms) in a lightweight and easily reversible way.
- Easily installing
graphviz
on Mac to allow building the docs. - Installing Python on Windows and providing a capable shell that allows using that Python from a terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just ugly and prone to breakage.
I would say "explicit and robust" 😄
(but it does add some maintenance burden)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I think that's a bug with the conda recipe, see conda-forge/astropy-feedstock#137 which was the minimal suggestion. Given the lack of optional dependencies in conda the general approach is to list all optional dependencies, which I am not sure why this isn't the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thinking we did discuss, maybe at the coordination meeting, that the conda recipe should be updated to include all optional dependencies. People who would want minimal installs are unlikely to be using conda.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way?
Use linux 😺? (sorry, couldn't resist, but, really, it is sad how the lessons they learned from package management have been ignored by the python ecosystem)
More to the point, most users I've seen behave like those @neutrinoceros described, create an environment and stick with it, so the example of @Cadair of a later conda install
is indeed worrying. But that perhaps also means that giving the very long conda install
comman is not such a big deal.
I guess my suggestion would be for the conda
baseline to be just that, and then use that long line as a reason to describe the pip install as an alternative, one that is perhaps especially good if one's system python is actually recent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of going towards installing just with pip
, as it is right now the "standard" way. I'm also fine with suggesting mini-conda, but not sure why we're essentially repeating the information that is already at https://github.com/conda-forge/miniforge -- I think it might be better to just point people to that and let them follow the instructions there. That then also avoids problems with the links to the various downloads getting out of date.
Looking at the miniforge instructions today, they seem good enough. @Cadair didn't agree, but since this issue about repeating the instructions has been such a sticking point in review, I'm just going to remove them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment that might apply in multiple places here: Doc :ref:
label should not be changed if you can help it, because it might break downstream intersphinx linking.
Still not a fan of us hosting miniforge installation doc (what if something is horribly broken and cause us to do a release to just fix the doc?) but given the urgency stated at CoCo tag-up today and in other discussions, I am okay with this as long as we have a follow-up issue to move this doc somewhere else like OpenAstronomy or Learn Astropy, knowing and accepting the risk that anyone who links to the install doc here would have broken links when that happens.
Removed! |
I think I have addressed the big-picture review comments, but I may have missed something. @pllim - about the |
I guess if people start complaining of broken link, we can put a dummy section back or something. Thanks for the clarification!
I was told to state my thoughts but I was also told that some prefers the installation here and only wants it moved later (not this PR). 😬 cc @eteq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now FWIW. Thanks!
@pllim - about removing the install instructions, I had decided to do that earlier after having another look at the native miniforge README instructions, also prompted by #16987 (review). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a huge improvement. I'm hoping we'll soon be able to simplify the conda one with the introduction of an astropy
and astropy-base/minimal/whatever
one, but don't think we should wait for that. Thanks, @taldcroft!
Let's do it then. If people feel strongly about removal of the install miniforge stuff, probably better as follow up PR. Thanks, all! |
This comment was marked as resolved.
This comment was marked as resolved.
Aww man, I think the dev docs reorg made auto backport impossible. @taldcroft , are you interested in manual backport? Everyone, let's wrap up astropy/astropy.github.com#617 next. Thanks! |
@pllim - about the manual backport, actually resolving the conflict is a mess and not tenable (at least by me). However, I have a branch set up that simply copies Does that sound like a plan? |
@taldcroft , I think that is acceptable. I don't think install has changed that dramatically between your re-org (though the diff would tell us for sure). You can ignore Thanks! |
For completeness, we just merged astropy/astropy.github.com#617 as well. |
Description
This pull request is to get the good work in #16555 across the finish line.
It starts from there and then makes significant changes to address some of the comments there. It also follows some of the ideas introduced in the developer documentation for making a dev environment. Most importantly:
miniconda
orAnaconda
based environments.astropy
usingpip
. Usingconda
(i.e.conda install astropy
) is mentioned only in passing.Close #16555