如何在PowerShell中为“ jupyter笔记本”设置别名?

缺口

每次我想启动ipython Notebook时,都必须在Windows命令行cmd或中键入“ jupyter notebook” powershell是否可以设置别名?我试图这样做powershell

New-Alias nb "jupyter notebook"

nb失败,因为powershell无法识别jupyter notebook为cmdlet或功能。

那么如何设置别名并将其保存在powershellipython notebook在Windows上有更好的主意吗?

河心

您需要包括可执行文件的路径,而不要包含“ jupyter notebook”,因为该程序不在$ env:path中。

new-alias nb "C:\SomePath\JupyterNotebook.exe"

而且您需要将此行放置在您的Powershell配置文件中(〜\ Documents \ WindowsPowerShell \ Microsoft.PowerShell_profile.ps1),以便每次启动Powershell时它都会运行。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章