jupyterlab and extension installation on mac

pre network setting

our internal network has some limitations, so firstly we should set the proxy of network.

export https_proxy=http://x.x.x.x:8080
export http_proxy=http://x.x.x.x:8080

install conda and jupyter lab

install conda, you can follow the

conda installation guide on macos

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda

install jupyter lab

jupyterlab installation guide

conda install -c conda-forge jupyterlab  #conda-forge: a open source channel name.
jupyter lab

jupyter robot extension installation

jupyter robot extension installtion guide

conda install -c conda-forge nodejs jupyterlab robotframework-seleniumlibrary geckodriver python-chromedriver-binary
pillow lunr

pip install robotkernel robotframework-seleniumscreenshots nbimporter

jupyter labextension install jupyterlab_robotmode
jupyter labextension install jupyterlab_robotmode@2.4.0  #recommend use this, latest version seems no syntax highlighting

jupyter labextension install @jupyter-widgets/jupyterlab-manager

jupyter lab

install jupyterlab examples

jupyterlab examples

from git readme:

> The examples currently target JupyterLab 2.x.
If you would like to use the examples with JupyterLab 1.x, check out the 1.x branch.
Note that the 1.x branch is not updated anymore.

git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extension-examples && \
  cd jupyterlab-extension-examples && \
  conda env create && \
  conda activate jupyterlab-extension-examples && \
  cd basics/hello-world && \
  jlpm && \
  jlpm run build && \
  jupyter labextension install . && \
  jupyter lab

(jupyterlab-extension-examples) zhaoting@M-C02Q90LGFVH6:~/Documents/xxxx/jpyter/jupyterlab-extension-examples$ jupyter lab --version
2.1.5

create our own jupyterlab extension

ref:https://jupyterlab.readthedocs.io/en/stable/developer/extension_dev.html

create own env

conda create  jupyterlab-zyt-test
conda activate  jupyterlab-zyt-test

1 create extension with cookiecutter extension-cookiecutter-ts

pip install cookiecutter

cookiecutter https://github.com/jupyterlab/extension-cookiecutter-ts --checkout v2.0

2 add code in your index.ts before import, you should use commands as follows to install some package you used:

jlpm add @jupyterlab/filebrowser
jlpm add @jupyterlab/application

3 test your ts file

npm install -g typescript
tsc test.ts

4 extension dev

extension dev guide

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦