pythonwindowsanacondajupyterqtconsole

how to launch recent Jupyter QtConsole on Windows without a console window


This older question appears to be out of date.

It used to be (based on reading git repos and the qtconsole issue tracker) you could launch the Jupyter QtConsole without a console window running the background with:

pythonw -m jupyter qtconsole

However, in recent versions of Jupyter, this still launches the background console window.

enter image description here

I am wondering if anyone knows how to launch the QtConsole without the annoying console window. I know you can do this from the Anaconda Navigator program, but I don't want to launch one program so that I can then launch another program. I would prefer to have a simple batch script or even a python script so that I can launch with a Start Menu shortcut

Running the module directly also does not work:

pythonw -c "from qtconsole.qtconsoleapp import main; main()"

This still launches a new console window as in the picture, so I don't really know if this is possible in some straightforward way, or if the Anaconda Navigator is doing some black magic to make this happen


Solution

  • There are two problems here:

    Both of these are specific to Anaconda and do not happen with the stock Python. As such, file a bug against https://github.com/conda-forge/qtconsole-feedstock to get this fixed.

    These are the workarounds:


    The OP reports that this solution may break other Anaconda packages. I believe those that break make assumptions about the availability of standard streams. Though it too counts as a bug in my book, it must be coming from the fact that Anaconda packages aren't tested with this setup.


    To create a shortcut/batch file to run the above command in Anaconda Prompt environment, see e.g. How to make batch files run in anaconda prompt.