rwalroth
rwalroth

Reputation: 340

Trying to launch jupyter lab in specified browser using .bat file

I'm trying to launch Jupyter lab in Edge because I use chrome for everything and I like being able to quickly find the tab that has Lab running. I have a .bat script I use, but I can't get it to work with a specified browser. So typing the following in cmd.exe works:

call C:\Users\[USERNAME]\Anaconda3\Scripts\activate.bat C:\Users\[USERNAME]\Anaconda3
call jupyter lab --browser "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe %s"

But calling this .bat file:

call C:\Users\[USERNAME]\Anaconda3\Scripts\activate.bat C:\Users\[USERNAME]\Anaconda3
call jupyter lab --browser "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe %%s"

Gives a "no web browser found" message. The echoed commands even match, it just can't find the browser.

Upvotes: 0

Views: 375

Answers (1)

rwalroth
rwalroth

Reputation: 340

Still not sure why, but the following .bat file works:

call "%USERPROFILE%\Anaconda3\Scripts\activate.bat" "%USERPROFILE%\Anaconda3"
jupyter lab --browser "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe %%s"

I'm still confused why commands work differently in the .bat than directly in the command line

Upvotes: 1

Related Questions