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

Update conda instructions #39515

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Conversation

saraedum
Copy link
Member

The conda instructions are a bit more complicated than they have to be. They also mention some things that are deprecated (Mambaforge) or uncessary (mamba).

Here, we try to simplify the instructions with the experience we had by running installations on SageDays 128.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion. Nothing that I would know of.
  • I have created tests covering the changes. No, it's quite complicated to test these things, i.e., making sure that the actual instructions work and the tests stay in sync with the instructions.
  • I have updated the documentation and checked the documentation preview.

mamba is great, and it's sometimes a bit faster than conda still. But
conda has finally upgraded their solver so the conda solver works
perfectly fine for our purposes.
it's figured out correctly automatically on Linux on macOS (tested at
SD128.)
most people reading this probably have no idea what channels are.
src/doc/en/installation/conda.rst Outdated Show resolved Hide resolved
@@ -156,5 +131,5 @@ To build the documentation, use::

You can update the conda lock files by running
``.github/workflows/conda-lock-update.py`` or by running
``conda-lock --platform linux-64 --filename environment-3.11-linux.yml --lockfile environment-3.11-linux.lock``
``conda-lock --platform linux-64 --filename environment-3.12-linux.yml --lockfile environment-3.12-linux.lock``
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated some strings in this file. Not that it really matters but maybe it is going to keep the commands valid literally for a little bit longer.

@saraedum saraedum requested a review from tobiasdiez February 13, 2025 16:01
@saraedum

This comment was marked as resolved.

@saraedum
Copy link
Member Author

saraedum commented Feb 13, 2025

@mantepse, the instructions here seem to work on macOS/Linux.

@saraedum saraedum added the sd128 tickets of Sage Days 128 Le Teich label Feb 13, 2025
src/doc/en/installation/conda.rst Outdated Show resolved Hide resolved

$ conda env update --file environment-3.12-linux.yml

If you want to use Jupyter notebooks, you need to install JupyterLab and the SageMath kernel::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's possible to do this, but if it is could you also explain how to create a Jupyter kernel for use in an existing/system Jupyter installation? This is something I've had trouble doing in conda so if there's a way to do it it would be nice to document.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's more complicated. You need to wrap things into an activation script and it's going to end up being more brittle. I am not sure whether I would want to advertise this here. (And I also don't want to test whether these instructions really work on Linux/macOS or even WSL.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.

@vincentmacri
Copy link
Contributor

Looks good, just waiting for the CI-generated documentation preview to finish so I can verify there are no formatting issues before marking as positive review.

@vincentmacri
Copy link
Contributor

Doc build failure seems relevant. The logs say something about an issue with the code/literal blocks in the file you're modifying here, so I'd start with checking those.


where ``X`` is version of Python, e.g. ``3.9``.
$ conda create -n sage sage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you only keep one, I recommend using mamba. It's drop-in replacement and much faster.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally use mamba but conda works just fine and it is available on the setups that we are covering here (see the top) i.e., also on miniconda and anaconda.

Copy link
Contributor

@vincentmacri vincentmacri Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with maintaining conda instructions as I think it's a bit more widely available in various distro repositories. No opinion on keeping both or having just conda.

@@ -73,51 +57,36 @@ environment for Sage development.

Here we assume that you are using a git checkout.

- Optionally, set the build parallelism for the Sage library. Use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think about it, why does this section even exist? isn't https://doc-release--sagemath.netlify.app/html/en/installation/meson enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, eventually this section should be removed. But I understood that the meson setup isn't sufficiently stable and some people are using the setup described here.

@tobiasdiez @dimpase do you think that the meson setup should be recommended for everybody that uses conda dependencies and we should just remove this page altogether?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a few months since I tried using the meson setup but I remember having issues with it.

Copy link

github-actions bot commented Feb 14, 2025

Documentation preview for this PR (built with commit 6b742c6; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@vincentmacri
Copy link
Contributor

There's a formatting issue, some of the text is appearing in code blocks: https://doc-pr-39515--sagemath.netlify.app/html/en/installation/conda

@saraedum
Copy link
Member Author

There's a formatting issue, some of the text is appearing in code blocks: https://doc-pr-39515--sagemath.netlify.app/html/en/installation/conda

Sorry for making such silly mistakes in this PR. I'll try to review it myself quickly when the docbuild is ready.

while that statement might be technically true somehow, I think for most
people this just "builds" Sage. That it is "installed" somehow is maybe
misleading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: needs review sd128 tickets of Sage Days 128 Le Teich
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants