-
Notifications
You must be signed in to change notification settings - Fork 117
Jupyter: Conda and Mamba #345
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
Open
ax3l
wants to merge
7
commits into
olcf:master
Choose a base branch
from
ax3l:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d9a7edc
Jupyter: ipympl hints
ax3l d3225b0
Fix formatting
ax3l ec6e7c9
Fix newlines
ax3l dd50116
Links: Annonymous Link Names
ax3l e056646
Code Highlighting
ax3l df4e5f2
Fix Verbatim Code
ax3l 689bb28
Remove 2nd example
ax3l File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,10 +107,13 @@ the Launcher and type ``conda list``. The libraries in the base environment shou | |
cover most use cases. This base environment is provided to the default "Python 3" notebook, visible in the | ||
JupyterLab "Launcher" page. | ||
|
||
From the Terminal, you can install additional libraries with a simple ``conda install`` to | ||
From the Jupyter Terminal, you can install additional libraries with a simple ``conda install`` to | ||
use in your current session. But these installed libraries won't persist across sessions | ||
if your server is restarted. | ||
if your server is restarted. | ||
|
||
Since conda's dependency concretizer has sometimes problems to extend existing environments with new | ||
libraries, you can also use the `mamba <https://github.com/mamba-org/mamba>`__ package manager. Just | ||
install it with ``conda install -c conda-forge mamba`` and replace ``conda`` with ``mamba`` calls. | ||
|
||
|
||
Creating your own Conda environment and notebook entry | ||
|
@@ -185,6 +188,23 @@ You may follow these general steps to create and install packages within an any | |
- *install packages with conda or pip in the activate environment* | ||
|
||
|
||
Example: Creating a Conda environment for Matplotlib Widgets | ||
============================================================ | ||
|
||
We currently install Jupyterlab version 2, which needs additional treatment to get interactive extensions | ||
`such as matplotlib widgets installed <https://github.com/matplotlib/ipympl>`__. | ||
|
||
Here is an example how to install matplotlib: | ||
|
||
.. code-block:: bash | ||
|
||
conda install -c conda-forge ipympl==0.5.8 | ||
jupyter labextension install @jupyter-widgets/jupyterlab-manager [email protected] | ||
|
||
Once the installation fishes, restart the kernel of your current notebook and refresh the page. | ||
You can now use the ``%matplotlib ipympl`` magic before importing matplotlib to render interactive plots. | ||
|
||
|
||
ax3l marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Manually stopping your JupyterLab session | ||
----------------------------------------- | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.