Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change terminal inside JupyterLab on Windows? #309

Closed
haesleinhuepf opened this issue Oct 17, 2021 · 9 comments
Closed

How to change terminal inside JupyterLab on Windows? #309

haesleinhuepf opened this issue Oct 17, 2021 · 9 comments

Comments

@haesleinhuepf
Copy link

haesleinhuepf commented Oct 17, 2021

Description

Hi all,

I'm rather new to Jupyter lab, locally installed as Desktop app. The terminal is typically quite powerful, but not here. First of all I'm wondering how to change the "default" cmd (which is powershell on my Windows) to a normal CMD. Furthermore, its PATH is obvidoulsy not configured. The user can't execute python from the terminal (and one cannot read python, because its orange):

image

Reproduce

  • Download Jupyterlab Version 3.1.18-1.
  • Install it on Windows with default configuration.
  • Start JupyterLab
  • Start a Terminal
  • Enter "python".

You will see the error above. Btw, also pip install fails

image

Expected behavior

I'm expcting it runs python.

Context

  • Operating System and version: Windows 10 20h2
  • JupyterLab-Desktop version: 3.1.18-1
  • Installer: JupyterLab-Setup-Windows.exe

Troubleshoot Output

PS C:\Users\rober> jupyter troubleshoot
jupyter : The term 'jupyter' is not recognized as the name of a cmdlet, function, script file, or operable program. Check 
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ jupyter troubleshoot
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (jupyter:String) [], CommandNotFoundException        
    + FullyQualifiedErrorId : CommandNotFoundException

Browser Output

Go to Help menu -> Open Developer Console to access the JavaScript console

There is no such menu:
image

@krassowski krassowski changed the title Terminal inside JupyterLab doesn't work on Windows How to change terminal inside JupyterLab on Windows? Oct 19, 2021
@JasonWeill
Copy link

@mbektas This came up again in #643, which @yuliaUU opened. I don't see powershell mentioned in the code; is there a workaround or fix for this?

@RRosio
Copy link

RRosio commented Apr 25, 2023

I found this potential work-around for the time-being, which mentions setting a $SHELL environment variable. I'm not sure it is applicable to JupyterLab-Desktop but it might be worth a try.

@krassowski
Copy link
Member

If you have a different shell installed you should be able to use it by customising the --ServerApp.terminado_settings traitlet, entering it with a correct path under "Settings" (under hamburger menu in top-right corner of the window bar) → "Server" tab → "Additional JupyterLab Server launch args":

Screenshot from 2023-04-25 19-36-47

Examples of valid arguments:

--ServerApp.terminado_settings="shell_command=['/bin/zsh']"
--ServerApp.terminado_settings="shell_command='/bin/zsh'"

This requires an up-to-date jupyter-server including jupyter-server/jupyter_server#949 (so v2.0+) - if you are using a custom environment it may not work

@yuliaUU
Copy link

yuliaUU commented Apr 25, 2023

I wonder if anyone know the fix for this for JupyterLab Desktop?

@mbektas
Copy link
Member

mbektas commented Jun 7, 2023

@haesleinhuepf @yuliaUU did you try the suggestion from @krassowski above? setting the addtional launch args as --ServerApp.terminado_settings="shell_command=['C:\Windows\SysWOW64\cmd.exe']" worked for me on Win 11.

@yuliaUU
Copy link

yuliaUU commented Jun 9, 2023

@mbektas I am not sure where I should add it to in Jupyter Lab Desktop app

@krassowski
Copy link
Member

@yuliaUU @haesleinhuepf please see Configuring JupyterLab Server launch > Server Launch Arguments section of the user guide.

@yuliaUU
Copy link

yuliaUU commented Jun 13, 2023

@krassowski thanks, that worked

@mbektas
Copy link
Member

mbektas commented Sep 12, 2023

resolved

@mbektas mbektas closed this as completed Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants