jupyter notebook调用conda 新建的环境
具体实现代码如下
# 进入新建的环境
(base) hu@ubuntu-server:~$ conda activate pyt38
# 在新建的环境中安装 ipykernel
(pyt38) hu@ubuntu-server:~$ conda install ipykernel
# 将环境写入notebook的kernel中
(pyt38) hu@ubuntu-server:~$ python -m ipykernel install --user --name pyt38 --display-name "pyt38"
# 其中pyt38 是新建环境,"pyt38"指的是在jupyter notebook中环境的别称