进入虚拟环境的jupyter快捷键
1.在当前文件夹目录中增加一个bat文件
2.bat文件内容
cmd.exe /K "conda activate myEnv && jupyter notebook --notebook-dir="." "
在这里必须使用 cmd.exe /K
是因为批处理文件无法直接激活 conda 环境。这是因为在 Windows 中,使用 activate 命令激活 conda 环境需要在 cmd.exe 或 Anaconda Prompt 等命令行工具中运行,而不能直接在批处理文件中运行。
解决这个问题的方法是在批处理文件中调用 cmd.exe 并执行激活 conda 环境的命令。
3.保存,修改文件格式为.bat文件
4.点击文件
完成~