Xavier, you could start a kernel and connect to it, instead of starting a jupyter console. If you're using ipykernel, that just requires running

    ipython kernel


Cheers,
Carlos

El 07/12/17 a las 14:57, Thomas Kluyver escribió:
Why do you want to start a console in the background? A console is an interactive user interface, so it doesn't really make sense to run it in the background. We can probably figure out a way to do it, but there may be a better way to achieve what you want to do.

On 7 December 2017 at 18:23, Xavier Orduña <[email protected] <mailto:[email protected]>> wrote:

    HI!

    I am trying to run jupyter console using docker and connect to
    this running console from another client. If I start the container
    using interactive mode (-ti) and then start the jupyter console,
    everything is fine.

    But if i run jupyter console as the entry point, then I got this
    exception:

    |
    Traceback(most recent call last):
    File"/usr/local/bin/jupyter-console",line 11,in<module>
        sys.exit(main())
    
File"/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py",line
    266,inlaunch_instance
    returnsuper(JupyterApp,cls).launch_instance(argv=argv,**kwargs)
    
File"/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py",line
    657,inlaunch_instance
        app.initialize(argv)
    File"<decorator-gen-116>",line 2,ininitialize
    
File"/usr/local/lib/python3.5/dist-packages/traitlets/config/application.py",line
    87,incatch_config_error
    returnmethod(app,*args,**kwargs)
    File"/usr/local/lib/python3.5/dist-packages/jupyter_console/app.py",line
    141,ininitialize
    self.init_shell()
    File"/usr/local/lib/python3.5/dist-packages/jupyter_console/app.py",line
    114,ininit_shell
        client=self.kernel_client,
    
File"/usr/local/lib/python3.5/dist-packages/traitlets/config/configurable.py",line
    412,ininstance
        inst =cls(*args,**kwargs)
    File"/usr/local/lib/python3.5/dist-packages/jupyter_console/ptshell.py",line
    273,in__init__
    self.init_prompt_toolkit_cli()
    File"/usr/local/lib/python3.5/dist-packages/jupyter_console/ptshell.py",line
    435,ininit_prompt_toolkit_cli
        output=create_output(true_color=self.true_color),
    
File"/usr/local/lib/python3.5/dist-packages/prompt_toolkit/shortcuts.py",line
    126,increate_output
        ansi_colors_only=ansi_colors_only,term=term)
    
File"/usr/local/lib/python3.5/dist-packages/prompt_toolkit/terminal/vt100_output.py",line
    424,infrom_pty
    assertstdout.isatty()
    AssertionErrorIntroduïu el codi aquí...
    |

    As far as I understand, the error is caused when the jupyter
    console tries to start the interactive terminal ...

    Is there any way to launch the console in the background? without
    showing the console it self in the terminal.

    I checked the options and I am unable to find any of the that
    suits my needs.

    This is the script that starts the kernel:

    |
    ./push_to_server.sh &
    IP=`ifconfig eth0 2>/dev/null|awk '/inet addr:/ {print $2}'|sed
    's/addr://'`
    #ipython kernel  --control=42005 --shell=42001 --iopub=42002
    --hb=42003 --stdin=42004 --ip="$IP" -f /kernel_config.json
    #ipython kernel  --ip="$IP" -f /kernel_config.json --log-level=DEBUG
    nohup jupyter console --ip="$IP"-f /kernel_config.json
    --log-level=DEBUG --kernel=python3 $*
    |

    As you can see, i used directly ipython kernel before, but then to
    have more than one kernel was complicated.

    Thank you very much!

    Xavi
-- You received this message because you are subscribed to the Google
    Groups "Project Jupyter" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:[email protected]>.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/jupyter/f406fc9a-7235-4b7e-91fe-424496d559e5%40googlegroups.com
    
<https://groups.google.com/d/msgid/jupyter/f406fc9a-7235-4b7e-91fe-424496d559e5%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qhTun9SqLbKqa1bJA%2BORVCc1SkoLNawofyV7wrxpEg5gw%40mail.gmail.com <https://groups.google.com/d/msgid/jupyter/CAOvn4qhTun9SqLbKqa1bJA%2BORVCc1SkoLNawofyV7wrxpEg5gw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Project 
Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/5cde4bb6-f2cb-59c3-f9a8-09abcd56e189%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to