How to set ipython/jupyter as the default python terminal for vscode?

前端 未结 3 1312
悲&欢浪女
悲&欢浪女 2020-12-31 16:05

How can I choose ipython/jupyter as the DEFAULT python terminal? I use both a windows 10 and a linux machine with the anaconda distribution.

If I type \"ipython\" o

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 16:46

    A slightly neater way to achieve @TwoUnderscorez's answer is to just launch the module with -m IPython:

    "python.terminal.launchArgs": [
       "-m",
       "IPython"
    ]
    

    Edit: For anyone struggling with IndentationError: unexpected indent errors, try the following:

    "python.terminal.launchArgs": [
       "-m",
       "IPython",
       "--no-autoindent",
    ]
    

    (wouldn't have just added a comment to the existing answer, but not enough rep)

提交回复
热议问题