如何在jupyter notebook中导入现有环境

大家是否在jupyter notebook 里面只能找到默认的 Python3(ipykernel)呢?

如何在jupyter notebook中导入现有环境_第1张图片

1.首先激活所需的环境

(base) C:\Users\scaaa>conda activate pytorch

2.如果需要导入现有环境,我们先要保证该环境支持jupyter notebook,有该功能,若没有则:

(pytorch) C:\Users\scaaa>pip install ipykernel

3.命名

(pytorch) C:\Users\scaaa>python -m ipykernel install --user --name "pytorch"

4.打开jupyter notebook,就可以看到该环境

(pytorch) C:\Users\scaaa>jupyter notebook
如何在jupyter notebook中导入现有环境_第2张图片

你可能感兴趣的:(jupyter,python,深度学习)