使用Jupyter Notebook运行代码
在cmd命令行输入
进入lesson1环境
conda activate lesson1
安装IPython内核:
在虚拟环境中,您需要安装IPython内核以便在Jupyter Notebook中运行代码。在终端或命令提示符中,输入以下命令来安装IPython内核:
conda install ipykernel
这将安装IPython内核包及其依赖项。
安装JupyterLab
官网:https://jupyter.org/install
安装JupyterLab
pip install jupyterlab
注意:如果您使用conda或mamba安装JupyterLab,我们建议您使用conda-forge通道。
启动JupyterLab
jupyter lab
Jupyter Notebook
安装notebook
pip install notebook
运行notebook:
jupyter notebook
导入自己的代码
选中代码块,然后运行