文章目录
Jupyter notebook调用Anaconda虚拟环境
本文章适合已安装好Anaconda的uu们使用,如果还没有安装好Anaconda或者对Anaconda不了解的可以看我这篇文章哦~绝对让你恍然大悟
还是搞不懂Anaconda是什么?读这一篇文章就够了
首先我们打开 anaconda prompt
,激活虚拟环境:

在当前环境中安装 ipykernel
conda install ipykernel -y
继续在该环境中安装 nb_conda
conda install -c conda-forge nb_conda -y
在该环境中启动 jupyter notebook
jupyter notebook
之后就可以在 jupyter notebook
中切换内核了,点击更换内核按钮可以看到所有的环境。

注意:打开之后这个
anaconda prompt
的窗口不能关。关了服务器就连不上了
Pycharm调用Anaconda虚拟环境
首先,让我们构建一个新的项目文件。[en]First of all, let’s build a new project file.

然后在虚拟环境中替换Python解释器[en]Then replace the python interpreter in the virtual environment

我们在Anaconda目录下找到了env,并且有一个以前安装过的虚拟环境。下面是一个python.exe文件,这是我们要配置的python解释器。[en]We found the envs under the Anaconda directory, and there is a virtual environment that has been installed before. Below is a python.exe file, which is the python interpreter we are going to configure.

选择完成后,界面如下[en]After the selection is made, the interface is as follows
Original: https://blog.csdn.net/weixin_56197703/article/details/124629964
Author: Aaron-ywl
Title: Jupyter notebook/Pycharm调用Anaconda虚拟环境
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/6030/
转载文章受原作者版权保护。转载请注明原作者出处!