-
Notifications
You must be signed in to change notification settings - Fork 523
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
Replaces anaconda python installation with miniforge #839
Conversation
Adds a basic python environment
✅ Deploy Preview for workshop-template-previews ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@dpshelio Given our workshops generally teach basic shell CLI (using git-bash on Windows, Terminal on MacOS, bash on Linux), I think it's OK to ask people to launch |
@n2ygk I also think it's not too much of a cognitive load to launch from the terminal, and it also avoids the problem we've encountered a few times with Windows where learners don't recognise the directories Jupyter is showing (normally on computers that got two user directory structure due to onedrive, and Jupyter opening the "standard" user profile and not the one the user is familiar with which normally is onedrive's). |
Thank you for submitting this @dpshelio. We established a task force to update the lesson setup instructions, and I would like to wait until that group has had time to consider the various different options, before implementing any change. The task force's decision will be made in the next month or so. |
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.
Thanks so much for opening this PR @dpshelio and for your patience while the Lesson Setup Instructions task force did its work. (Recommendations to be published next week.)
I request a few changes before this could be merged. The major one is to adjust the environment YAML file to include all the dependencies for Python lessons aimed at novices across Data Carpentry, Library Carpentry, and Software Carpentry lessons (and adjusting the name of the file+environment to reflect this). I also think we need to be extra careful to ensure that learners download the file to their Downloads folder, so that the subsequent step they run on the command line will be more likely to work.
name: swc | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- ipykernel | ||
- jupyter | ||
- matplotlib | ||
- numpy | ||
- pandas |
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.
name: swc | |
channels: | |
- conda-forge | |
dependencies: | |
- ipykernel | |
- jupyter | |
- matplotlib | |
- numpy | |
- pandas | |
name: carpentries | |
channels: | |
- conda-forge | |
dependencies: | |
- ipykernel | |
- jupyter | |
- matplotlib | |
- numpy | |
- pandas | |
- plotnine | |
- plotly | |
- seaborn |
Add a few more libraries to support the DC and LC (novice) Python lessons as well.
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 would also require the filename to change (e.g. cp_environment.yml
)
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>.</li> | ||
<li>Search for the application "Miniforge Prompt", open it and run: <code>conda env create -f ~/Downloads/swc_environment.yml</code></li> |
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.
How confident can we be that ~/Downloads/
is the location where everyone will find the environment file after downloading it? I feel that we need to provide additional details here to ensure that learners save it to the right place.
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.
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>.</li> | |
<li>Search for the application "Miniforge Prompt", open it and run: <code>conda env create -f ~/Downloads/swc_environment.yml</code></li> | |
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>. Save the file to your Downloads folder.</li> | |
<li>Search for the application "Miniforge Prompt", open it and run: <code>conda env create -f ~/Downloads/swc_environment.yml</code></li> |
to prepend Miniforge to your <code>PATH</code> | ||
(this makes the Miniforge distribution the default Python). | ||
</li> | ||
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>.</li> |
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.
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>.</li> | |
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>. Save the file to your Downloads folder.</li> |
and need to update miniconda for miniforge | ||
Also, the https://pypi.org/project/start-jupyter-cm/ could be helpful. | ||
{% endcomment %} | ||
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>.<br> |
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.
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>.<br> | |
<li>Download the <a href="./data/swc_environment.yml" download>environment file</a>. Save the file to your Downloads folder.<br> |
I would like to make these updates ASAP so I will merge this now and apply my changes afterwards. Thanks again for contributing this @dpshelio ❤️ |
Due to the anaconda ToS changes, using conda-forge avoids that learners may be in breach of the ToS after they leave the workshop. This has been discussed in Carpentries #genral Slack and a pip alternative is provided at #837.
It provides instructions to create a
swc
environment is created with the basic needs for the workshops (includes explicitly bothnumpy
for the inflammation lesson andpandas
for the gapminder).This, however, has the added difficulty to require that learners change environment (
conda activate swc
) and startjupyter
from the terminal and not from a launcher (as anaconda provides for Windows and macOS).I've tried to find up a way to get jupyter installed in the base env, and provide instructions to create a shortcut, but it becomes too cumbersome, plus it would only benefit Windows users. A comment has been left there to inform future attempts.