Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:advanced:jupyter [2022/03/25 16:02] – [Step 3: Install the dependencies from the Debian repos and compile the code] gkazhoya | tutorials:advanced:jupyter [2022/07/06 11:40] (current) – [Step 2: Download the source code for the Jupyter Common Lisp kernel] gkazhoya | ||
---|---|---|---|
Line 9: | Line 9: | ||
You need Python3 to install the newest version of JupyterLab. | You need Python3 to install the newest version of JupyterLab. | ||
- | This installation was tested on Ubuntu 16.04 but should work on 18.04 and 20.04 as well. | + | This installation was tested on Ubuntu 16.04 and 20.04 (python 3.8). |
- | ==== Step 1: Install JupyterLab ==== | + | ===== Step 1: Install JupyterLab |
First, if you don't have it, install pip or rather pip3: | First, if you don't have it, install pip or rather pip3: | ||
<code bash> | <code bash> | ||
- | $ sudo apt-get install python3-pip python3-dev | + | $ sudo apt install python3-pip python3-dev |
</ | </ | ||
Line 29: | Line 29: | ||
$ jupyter-lab | $ jupyter-lab | ||
</ | </ | ||
- | |||
- | Troubleshooting: | ||
- | <code bash> | ||
- | $ curl -O https:// | ||
- | $ sudo -E python3 get-pip.py | ||
- | </ | ||
- | But maybe you should just update your Ubuntu. | ||
- | Or maybe ask a friend or the internet to help you getting Jupyter to run. | ||
Line 45: | Line 37: | ||
<code bash> | <code bash> | ||
$ roscd && cd ../src | $ roscd && cd ../src | ||
- | $ mkdir jupyter | + | $ catkin_create_pkg |
$ cd jupyter | $ cd jupyter | ||
- | $ curl -O https:// | + | $ curl -O https:// |
- | $ wstool merge common-lisp-jupyter.rosinstall && wstool update | + | $ wstool init && |
+ | $ roscd && cd .. | ||
+ | $ catkin_make # or catkin build if this workspace has been build like that before | ||
</ | </ | ||
Line 88: | Line 82: | ||
- | Troubleshooting: if you get compilation errors when loading the ASDF system of common-lisp-jupyter, | + | ===== Step 4: Test if it worked ===== |
- | Execute the command inside the common-lisp-jupyter Git repo: | + | Make sure you kill any old versions of JupyterLab that are running. Then: |
<code bash> | <code bash> | ||
- | $ git checkout 689f47667ab6a4a9865776fdd159d8bbdc222f20 | + | $ jupyter-lab |
</ | </ | ||
- | If that still doesn' | + | Inside Jupyter, go to File -> New -> Notebook and in the list of Kernels |
- | ==== Step 4: Test if it worked ==== | + | Have fun. |
- | Make sure you kill any old versions of JupyterLab that are running. Then: | + | {{ :tutorials: |
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | === Step 1 === | ||
+ | |||
+ | Sometimes the PIP version on the Debian repos for your Ubuntu might be outdated. In that case you will see an error when calling the JupyterLab installation command, it will tell you exactly that, that your PIP version is too old. In that case, you can install pip from a different repo, like so: | ||
<code bash> | <code bash> | ||
- | $ jupyterlab | + | $ curl -O https:// |
+ | $ sudo -E python3 get-pip.py | ||
</ | </ | ||
+ | But maybe you should just update your Ubuntu. Before 20.04 python 2.7 is the default, after it's 3.6+. Check your version with ' | ||
- | Inside Jupyter, go to File -> New -> Notebook and in the list of Kernels you should see Common Lisp now. | + | If there are multiple people working on the same PC and you want to install the stuff only for yourself, you can specify that with 'pip install |
- | Have fun. | + | When the jupyter installation tells there are version requirements for certain packages you can install the specific version like this. Check the required version from your command prompt, it may be different from this. |
+ | <code bash> | ||
+ | # use pip3 instead if pip is for python2 | ||
+ | pip install --user traitlets==5.2.2.post1 | ||
+ | pip install --user ipython==7.23.1 | ||
+ | </ | ||
+ | That specific version of traitlets also fixes a bug with jupyter-lab. ipython can be outdated if previously installed via aptitude. | ||
- | {{ : | + | === Step 3 === |
- | ==== Appendix ==== | + | |
- | If ASDF doesn' | + | If ASDF doesn' |
<code lisp> | <code lisp> | ||
Line 125: | Line 132: | ||
(pushnew (parse-namestring jupyter-dir-path) asdf: | (pushnew (parse-namestring jupyter-dir-path) asdf: | ||
</ | </ | ||
+ | |||
+ | |||
+ | If you get compilation errors when loading the ASDF system of common-lisp-jupyter, | ||
+ | |||
+ | <code bash> | ||
+ | $ git checkout 689f47667ab6a4a9865776fdd159d8bbdc222f20 | ||
+ | </ | ||
+ | |||
+ | If that still doesn' | ||
+ | |||
+ | |||
+ |