jupyterlab非常强大,非常像网页版vscode。知乎上有人对其进行了整理
xeus-python配合jupyterlab使用会发挥出更强的效果,一些像debugger之类的插件也只有xeus-python能够使用。
创建虚拟环境并安装xeus-python
先不要装python,由于预装python为python3.7.2,而xeus-python需要python3.7.3,升级过程中会产生依赖问题,我google半天未果,索性直接装3.7.3版本
conda create -n program
切换到program环境
conda activate program
前往anaconda官网查找支持aarch64架构的python
找到了quansight-small-test提供的python正好是3.7.3版本
conda install python -c quansight-small-test -y
等待下载完,下载xeus-python
conda install xeus-python
下载jupyterlab
pip install jupyterlab
配置开机自启
树莓派爱好者基地64位系统的用户可以编辑/boot/rc-local
文件,其余用户则是编辑/etc/rc.local
文件
sudo vim /boot/rc-local
在exit 0
上方添加
path_to_your_conda_envirenment/bin/jupyter-lab
安装插件
jupyter的一大魅力就在于它的插件
安装插件前需要先安装nodejs
conda install nodejs
build的时候还需要安装yarn,此处yarn不建议用conda安装,版本很低,之后会产生问题
npm install --global yarn
更换源
可参考
yarn config set registry http://registry.npm.taobao.org/
文章开头提到的知乎分享的文章里还在github上整理出了众多插件,可以一个个尝试
安装完插件后输入
jupyter lab build
RuntimeError
有时候会报一个RuntimeError
,可以打开/tmp/xxx.log
查看是哪里超时,然后打开路径下的staging
文件夹,看到有yarn.js
文件,有时候有yarn.lock
文件,多半就没错了,然后
yarn install --timeout=10000
基本上就能用了