Closed vincentarelbundock closed 7 months ago
I did not dive deep into this code, and I'm not great with Python environments, so I'll wait for @etiennebacher to take a look before merging.
I'm also not an expert on venv so I don't know how this will behave on Windows. Overall, I'd like to show the code to copy-paste only if we can provide it for all OS, not just Unix-like.
I can try on windows in a couple of days
The second line doesn't work on Windows, it should be this instead:
.venv_altdoc\Scripts\pip.exe install mkdocs mkdocs-material
You can use .is_windows()
to show one or the other depending on the user's OS (or show both like "if you are on Windows, use this, and if you are on Unix, use that". I don't have strong opinions on that).
I was a bit confused by the error message about virtual environment for
mkdocs
, because it seemed like I did not in fact need to activate the environment, becausealtdoc
took care of it automatically.Here's a proposal for a more informative message. Note that the code is not enclosed in backticks. This allows users to select/copy/paste the lines from the error message directly in their consoles instead of typing them manually.