Skip to content

Commit c18f8ae

Browse files
add Jupyter notebook tutorial
1 parent 3316932 commit c18f8ae

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

tutorials.00.index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
This page serves as the index for a series of tutorials on using and building
55
ORE python wrappers and wheels.
66

7+
[Run Jupyter Notebook Examples using the published ORE Python module](tutorials.06.notebooks.md)
8+
79
[Installing ORE Python Libraries and Example Scripts on Windows](tutorials.01.install_windows.md)
810

911
[Installing ORE Python Libraries and Example Scripts on Posix Systems (e.g. MacOS and Linux)](tutorials.02.install_posix.md)

tutorials.06.notebooks.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Run Juyper Notebook examples using the ORE Python wheels
2+
3+
This tutorial is aimed at the user who wants to install the ORE
4+
Python module and use it to execute example Jupyter notebooks provided on
5+
https://github.com/OpenSourceRisk/ORE-SWIG. No compilation is necessary.
6+
7+
[Back to tutorials index](tutorials.00.index.md)
8+
9+
**Please note** that (as of October 2023) the published ORE Python wheels are
10+
available for Python versions 3.8 up to 3.11 for Windows, Linux and macOS arm64,
11+
and Python versions up to 3.10 for Intel Mac users.
12+
13+
We assume below that the python executable points to a permissible Python 3 version.
14+
15+
Create a virtual environemnt
16+
python -m venv venv
17+
18+
Activate the virtual environment (Windows)
19+
CALL .\venv\Scripts\activate.bat
20+
21+
Activate the virtual environment (Linux, Mac)
22+
source "$(pwd)/venv/bin/activate"
23+
24+
Upgrade pip
25+
python -m pip install --upgrade pip
26+
27+
Install required Python modules
28+
python -m pip install open-source-risk-engine pytest matplotlib pandas plotly jupyter_server==2.8.0 jupyter
29+
30+
Launch Jupyter with reference to the Notebooks directory
31+
python -m jupyterlab --notebook-dir=/path/to/OREAnalytics-SWIG/Python/Examples/Notebooks
32+
33+
Exit the virtual environment
34+
deactivate
35+
36+

0 commit comments

Comments
 (0)