美文网首页
jupyter-lab使用conda中的环境

jupyter-lab使用conda中的环境

作者: Aipeli | 来源:发表于2021-11-12 21:26 被阅读0次

一、环境

  • jupyter-lab
  • conda

二、配置步骤

  • 进入conda环境
conda activate mozi
  • 安装jupyter-lab
pip install jupyterlab
  • 给环境安装ipykernel
conda install -n mozi ipykernel
  • 将环境写入jupyterlabkernel
    python -m ipykernel install --user --name <conda环境名称> --display-name “<在jupyterlab中的名称>”
python -m ipykernel install --user --name mozi --display-name mozi
  • 将环境从jupyterlab中删除
    存放目录 C:\Users\Administrator\AppData\Roaming\jupyter\kernels
jupyter kernelspec remove mozi
  • 运行jupyter-lab
jupyter-lab
  • 在打开页中选择python-mozi环境就可以使用conda环境了
    选择界面

三、给jupyter-lab安装代码提示 kite

kite
conda install -c conda-forge nodejs
pip install jupyter-kite>=2.0.2
  • jupyter-lab安装扩展包
jupyter labextension install @kiteco/jupyterlab-kite

四、给jupyter-lab安装代码提示jupyter-lsp

  • 安装jupyter-lsp所需要的包
pip install jupyterlab-lsp
conda install -c conda-forge jupyterlab-lsp
pip install jupyter-lsp
conda install -c conda-forge nodejs
pip install python-language-server[all]
  • jupyter-lab安装扩展包
jupyter labextension install @krassowski/jupyterlab-lsp 

相关文章

网友评论

      本文标题:jupyter-lab使用conda中的环境

      本文链接:https://www.haomeiwen.com/subject/coizzltx.html