manim icon indicating copy to clipboard operation
manim copied to clipboard

Rewrite installation instructions

Open JasonGrace2282 opened this issue 1 year ago • 3 comments

#3501 removed the ffmpeg dependency - this meant that our installation docs could be drastically simplified. This an attempt to do that. Specifically

  • Merges macOS and Windows installation instructions into one
  • ~~Leaves Optional Dependency stuff in their own file depending on the system.~~ EDIT: They're now in tabs - see behackl's comment

Further improvement ideas welcome!

Also closes #3864

https://manimce--3930.org.readthedocs.build/en/3930/installation/local.html

JasonGrace2282 avatar Sep 02 '24 20:09 JasonGrace2282

I wonder whether we should collapse the installation instructions for Windows / MacOS / Linux back onto one single page and make use of code tabs https://sphinx-design.readthedocs.io/en/furo-theme/tabs.html#tabbed-code-examples to switch out the respective instructions?

With all the externally managed Python environments around it might also be worth considering just recommending an installation via uv; uv tool install manim. This would, however, probably increase friction as users would then look up the path to the tool env and feed that into their IDEs ... 🤔

behackl avatar Oct 20 '24 09:10 behackl

I wonder whether we should collapse the installation instructions for Windows / MacOS / Linux back onto one single page and make use of code tabs https://sphinx-design.readthedocs.io/en/furo-theme/tabs.html#tabbed-code-examples to switch out the respective instructions?

Just took a look and it looks amazing! Definitely agree with using tabs for different operating systems.

With all the externally managed Python environments around it might also be worth considering just recommending an installation via uv; uv tool install manim. This would, however, probably increase friction as users would then look up the path to the tool env and feed that into their IDEs ... 🤔

The idea of just uvx manim and calling it a day does seem pretty cool, but I agree users might have trouble linking the uv tool environment to their IDE. I think a better approach might be to just tell users to do something like

# I wonder what python will be chosen if the user doesn't have python
uv init project-name
cd project-name
uv add manim
uv run manim -p ...

And then most IDE's will recognize that a .venv folder exists in the current directory. Not as clean as a simple uv tool install manim, but it avoids that pain point.

Or we could just not use uv :)

JasonGrace2282 avatar Oct 20 '24 16:10 JasonGrace2282

I just pushed a commit changing the recommendation to uv, would be glad to hear thoughts.

JasonGrace2282 avatar Oct 27 '24 22:10 JasonGrace2282

I very much like what you have done here, thank you for your efforts!

After some more thinking, there are some details I would change (I can push a commit -- or a separate branch for a 1:1 comparison):

  • I like uv being used, a lot -- in particular as installing it is very straightforward on all of our platforms.
  • I think the best practice that people should follow when creating manim projects is creating a local virtual environment to which they add manim as a dependency. Basically: uv init my-manim-projects && cd my-manim-projects && uv add manim. As long as we do not officially support 3.13, we will need to recommend pinning the python version to, say, 3.12. Installing manim as a global tool (or generally, installing it without using uv) can be recommended further down on the page.
  • I'd shorten the optional dependencies section even further, just recommand MikTeX for Windows, MacTeX for MacOS, and texlive via the system's package manager for linux.
  • The section on Conda should be rewritten to include a mention to homebrew too; maybe "Alternate System Package Managers" or so.

But all in all, I definitely agree that this sort of unified set of instructions is the way to go. We should look into setting up redirects from the old /windows, /linux, /macos pages to the new /local (or /pip?) page, otherwise we will break a lot of static guides.

behackl avatar Nov 17 '24 10:11 behackl

Feel free to push a commit, I probably won't be able to work on this PR until next weekend. I also agree with setting up redirects, but I'm not quite sure how to do it (I don't think we can change the nginx configuration for readthedocs?)

JasonGrace2282 avatar Nov 17 '24 12:11 JasonGrace2282

I've pushed a somewhat orthogonal suggestion to this branch, the corresponding site is available at https://manimce--3930.org.readthedocs.build/en/3930/installation/pip.html.

I have not verified that all of the linux instructions really work exactly like they are stated here, but all in all I am pretty happy with where this is moving. I largely drew from @JasonGrace2282's first draft and tried to trim a few (in my opinion) superfluous branches while trying to keep the standard case somewhat succinct.

behackl avatar Dec 01 '24 19:12 behackl

The installation guide for uv is now available here: https://manimce--3930.org.readthedocs.build/en/3930/installation/uv.html

henrikmidtiby avatar Dec 03 '24 17:12 henrikmidtiby

I've done some additional polishing, removed v1 (as it seemed to be the general preference of everyone who participated so far -- otherwise we can of course revert my last commit) -- and am generally happy with the state of things here.

I'll ask for one more round of feedback of all helpers, but would then like to merge this (and move closer to actually making the release). As I've said a bunch of times before, it'd be nice to lower the barrier for making a patch release so that we can update the stable version of these docs more frequently (and I think we decided that this was a good idea too).

behackl avatar Dec 05 '24 10:12 behackl