在 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