Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:jupyter [2025/03/05 11:44] – [WSL1] darrontools:jupyter [2025/03/08 01:07] (current) darron
Line 1: Line 1:
-====Jupyter notebook====+====Jupyter====
  
-[[https://jupyter.org/|Jupyter]]+This page demonstrates installation Jupyter notebook with [[projects:wikibass|wikiBASS]].
  
-===WSL1===+===Debian=== 
 + 
 +Follow the guide for [[projects:wikibass|wikiBASS]] for Debian 
 +which installs Jupyter as a dependency within its virtual environment. 
 + 
 +==Run== 
 + 
 +<code> 
 +jupyter-notebook 
 +</code> 
 + 
 +===Windows=== 
 + 
 +Install [[https://wiki.kewl.org/projects:wikibass#setup|Python]] for Windows as per the  
 +instructions found in [[https://wiki.kewl.org/projects:wikibass|wikiBASS]].
  
-Install [[https://wiki.kewl.org/projects:wikibass#setup|Python]] for WSL1 as per the  +Setup and run notebook from Windows PowerShell
-instructions for the [[https://wiki.kewl.org/projects:wikibass|wikiBASS]] demo.+
  
 ==Setup== ==Setup==
Line 12: Line 25:
 <code> <code>
 py -m pip install jupyter py -m pip install jupyter
-mkdir -p /mnt/c/Notebook+py -m pip install notebook
 </code> </code>
  
-==Script==+==Run== 
 + 
 +<code> 
 +jupyter-notebook 
 +</code> 
 + 
 +===WSL1=== 
 + 
 +Follow the instructions above for Windows to install Python and Jupyter. 
 + 
 +==Setup== 
 + 
 +Create a shell script to run Jupyter in WSL1 utilising the Windows  
 +installation. 
 + 
 +__jupyter.sh__
  
-__lab.sh__ 
 <code> <code>
 #! /bin/sh #! /bin/sh
  
-username is windows login+if test $-ne 1; then 
 +        echo "USAGE: jupyter.sh notebook|lab\n" 
 +        exit 
 +fi
  
-PYTHON="/mnt/c/Users/darro/AppData/Local/Programs/Python/Python313"+mkdir -p "$HOME/Notebook" && cd "$HOME/Notebook"
  
-PY=$PYTHON/python.exe+# username is windows login
  
-cd $PYTHON/Lib/site-packages+PYTHON="/mnt/c/Users/username/AppData/Local/Programs/Python/Python313/python.exe"
  
-$PY jupyter.py lab --notebook-dir=C:/Notebook+JUPYTER="C:/Users/username/AppData/Local/Programs/Python/Python313/Lib/site-packages/jupyter.py"
  
-#--preferred-dir C:/Documents/Somewhere/Else+case "$1" in 
 +        notebook) 
 +        $PYTHON $JUPYTER notebook 
 +        ;; 
 +        lab) 
 +        $PYTHON $JUPYTER lab 
 +        ;; 
 +        *) 
 +        echo "USAGEjupyter.sh notebook|lab\n" 
 +        exit 
 +esac
 </code> </code>
  
-==Run== +===Run==
 <code> <code>
-sh lab.sh+sh jupyter.sh notebook
 </code> </code>
 +
 +===Resources===
 +
 +[[https://jupyter.org/|Jupyter homepage]]