Skip to content

Commit

Permalink
Use the %pip magic
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Oct 26, 2022
1 parent 2f44b00 commit ec2b8d8
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 102 deletions.
6 changes: 1 addition & 5 deletions docs/source/examples/Beat Frequencies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'matplotlib', 'numpy'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets matplotlib numpy"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Controller.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install('ipywidgets')\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Exploring Graphs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'matplotlib', 'networkx'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets matplotlib networkx"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Factoring.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'sympy'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets sympy"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Image Browser.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'matplotlib', 'scikit-learn'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets matplotlib scikit-learn"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Image Processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'scikit-learn', 'numpy', 'matplotlib'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets scikit-learn numpy matplotlib"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Layout Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'ipyleaflet', 'numpy', 'bqplot', 'pandas'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets ipyleaflet numpy bqplot pandas"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Layout Templates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'bqplot', 'numpy'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets bqplot numpy"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Lorenz Differential Equations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'matplotlib', 'numpy', 'scipy'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets matplotlib numpy scipy"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Media widgets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Output Widget.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Using Interact.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Variable Inspector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Widget Alignment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Widget Asynchronous.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets', 'matplotlib', 'numpy', 'scipy'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets matplotlib numpy scipy"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Widget Basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Widget Events.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Widget Layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down
10 changes: 3 additions & 7 deletions docs/source/examples/Widget List.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down Expand Up @@ -1169,8 +1165,8 @@
"\n",
"This is useful if you need to compare the picked datetime to naive datetime objects, as Python will otherwise complain!"
]
},
{
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
Expand Down
6 changes: 1 addition & 5 deletions docs/source/examples/Widget Low Level.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,7 @@
"outputs": [],
"source": [
"# Imports for JupyterLite\n",
"try:\n",
" import piplite\n",
" await piplite.install(['ipywidgets'])\n",
"except ImportError:\n",
" pass"
"%pip install -q ipywidgets"
]
},
{
Expand Down

0 comments on commit ec2b8d8

Please sign in to comment.