在pycharm等处打开jupyter,发现只有一个python3环境,其余的虚拟环境均不可见

解决方案:

1在命令行或者anaconda prompt中激活虚拟环境

2输入以下代码:

ipython kernel install --user --name=[你想要jupyter中显示的虚拟环境名]

例如

ipython kernel install --user --name=pytorch24

输出如下:

0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
Installed kernelspec pytorch24 in C:\Users\me\AppData\Roaming\jupyter\kernels\pytorch24

之后再打开jupyter就可以切换已有的虚拟环境了

更多推荐