每次我想启动ipython Notebook时,都必须在Windows命令行cmd
或中键入“ jupyter notebook” powershell
。是否可以设置别名?我试图这样做powershell
:
New-Alias nb "jupyter notebook"
nb
失败,因为powershell
无法识别jupyter notebook
为cmdlet或功能。
那么如何设置别名并将其保存在powershell
?ipython notebook
在Windows上有更好的主意吗?
您需要包括可执行文件的路径,而不要包含“ jupyter notebook”,因为该程序不在$ env:path中。
new-alias nb "C:\SomePath\JupyterNotebook.exe"
而且您需要将此行放置在您的Powershell配置文件中(〜\ Documents \ WindowsPowerShell \ Microsoft.PowerShell_profile.ps1),以便每次启动Powershell时它都会运行。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句