使用.bat更改目录并运行Jupyter [英] Using a .bat to change directories and run Jupyter
问题描述
我是编码的新手,但我只想更改目录并运行jupyter.问题是,一旦到达jupyter notebook命令,cmd会立即关闭.也尝试了cmd/k,但没有效果.我一定做错了.
I'm new to coding but I simply want to change directory and run jupyter. The problem is cmd instantly closes once it reaches the jupyter notebook command. Tried cmd /k too but it doesn't have an effect. I must being doing this wrong.
F:
cd directoryname
activate environmentname
jupyter notebook
pause
解决方案: 在.bat中执行命令时,由于某种原因这些命令关闭了提示(键入时不显示).解决的方法是在命令之前键入call.
Solution: The commands were closing the prompt for some reason when executed in a .bat (they don't when typed). The fix was to type call before the commands.
F:
cd directoryname
call activate environmentname
call jupyter notebook
pause
推荐答案
在.bat中执行命令时,由于某种原因,命令关闭了提示(键入时未显示).解决的方法是在命令之前键入call.
The commands were closing the prompt for some reason when executed in a .bat (they don't when typed). The fix was to type call before the commands.
F:
cd directoryname
call activate environmentname
call jupyter notebook
pause
这篇关于使用.bat更改目录并运行Jupyter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!