备忘录:Jupyter

新环境安装

 pip install jupyterlab==3.6.3
 pip install nodejs
 pip install jupyterlab-lsp==3.10.2
 pip install python-lsp-server[all]
 pip install jupyterlab-unfold==0.2.2
 pip install jupyterlab-language-pack-zh-CN==3.5.post4

1. jupyterlab 安装与卸载

conda install -c conda-forge jupyterlab
pip install jupyterlab

完全卸载Jupyter

pip uninstall -y jupyterlab
pip uninstall -y jupyterlab-pygments
pip uninstall -y jupyter-console
pip uninstall -y jupyterlab-server
pip uninstall -y jupyterlab-widgets

2. jupyter默认更改

  1. 启动目录修改
# notebook
jupyter notebook --generate-config
c.NotebookApp.notebook_dir = "F:\BaiduNetdiskWorkspace\CodeStudy\JupyterLab"
# lab
jupyter lab--generate-config
c.ServerApp.root_dir = "F:\BaiduNetdiskWorkspace\CodeStudy\JupyterLab"
  1. 浏览器修改
# 改为chrome
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser
(u'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe'))
c.NotebookApp.browser = 'chrome'
# 改为Edge
import webbrowser
webbrowser.register("Microsoft Edge",None,webbrowser.GenericBrowser
(u"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"))
c.ServerApp.browser = 'Microsoft Edge'

3. 插件安装

3.1 jupyter-lsp安装
  1. 安装
pip install nodejs
pip install jupyterlab-lsp
pip install python-lsp-server[all]
  1. 在网页的侧边栏的插件管理器中搜索lsp,找到名称为【@krassowski/jupyterlab-lsp】的插件,点击安装。
3.2 jupyterlab-unfold

代码折叠

3.2 jupyterlab_code_formatter
# 安装插件
pip install jupyterlab_code_formatter
# 安装格式化工具
pip install black isort
3.3 jupyterlab 汉化包
pip install jupyterlab-language-pack-zh-CN

4. 其他

conda clean -p      //删除没有用的包
conda clean -t      //删除tar包
conda clean -y --all //删除所有的安装包及cache
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值