在 jupyterlab 和 jupyter notebook 中集成conda虚拟环境


在jupyterlab中切换虚拟环境使用jupyter-conda包,参考链接:https://pypi.org/project/jupyter-conda/

Install
Requirements

conda >= 4.5
notebook >= 4.3
JupyterLab 1.0 (for the jupyterlab extension only)

To install in the classical notebook:

conda install -c conda-forge jupyter_conda

To install in the JupyterLab:

conda install -c conda-forge jupyterlab jupyter_conda
jupyter labextension install jupyterlab_toastify jupyterlab_conda

之前采用的是nb_conda_kernels包,该包在jupyter notebook中运行良好,但在jupyterlab中失效,切换虚拟环境运行无效。

jupyter-conda包是nb_conda_kernels包的分支,这是官网的解释:
Provides Conda environment and package access extension from within Jupyter Notebook and JupyterLab.
This is a fork of the Anaconda nb_conda package. The decision to fork it came due to apparently dead status of the previous package and a need to integrate it within JupyterLab.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM