brainvisa / casa-distro

Unified development environment for BrainVISA projects.
2 stars 1 forks source link

ipython shell window does not work in casa-dev-5.2 (ubuntu 20.04) #288

Closed denisri closed 2 years ago

denisri commented 3 years ago

Describe the bug Opening an ipython shell from Anatomist or Brainvisa doesn't work using the current casa-dev-5.1 image (Ubuntu 20.04) This is probably due to different versions of ipython, jupyter, tornado, and other modules.

To Reproduce Steps to reproduce the behavior:

  1. open brainvisa
  2. select in the menu "BrainVisa/start shell"
  3. See error:
    
    ipfunc: from jupyter_core import application; app = application.JupyterApp(); app.initialize(); app.start()
    runing IP console kernel
    NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049

To connect another client to this kernel, use: --existing kernel-10354.json Traceback (most recent call last): File "/casa/host/build/python/brainvisa/processing/qt4gui/neuroProcessesGUI.py", line 194, in startShell ipConsole = brainvisa.processes.runIPConsoleKernel() File "/casa/host/build/python/brainvisa/processes.py", line 7140, in runIPConsoleKernel my_start_ioloop_callbacks(ioloop.IOLoop.instance()) File "/casa/host/build/python/brainvisa/processes.py", line 7129, in my_start_ioloop_callbacks ncallbacks = len(self._callbacks) AttributeError: 'AsyncIOMainLoop' object has no attribute '_callbacks'


**Environment:**
 - Engine: Singularity
 - Version of BrainVISA: master branch (5.1)
 - version of the casa-dev image: `casa-dev-5.1-1`, `build_number: 1`

**Additional context**
It was extremely difficult to find a combination of modules versions which worked on Ubuntu 18.04. The shell window opening relies on (unfortunately) undocumented and changing APIs (but there is no official way to do it).
On Ubuntu 18.04, we had (working combination):

ipycanvas 0.9.0 ipyevents 0.8.2 ipykernel 4.10.1 ipython 5.9.0 ipython-genutils 0.2.0 ipywidgets 7.6.3 jupyter 1.0.0 jupyter-client 5.3.5 jupyter-console 5.2.0 jupyter-core 4.7.1 jupyterlab-widgets 1.0.0 tornado 4.5.3

On Ubuntu 20.04, we have:

ipykernel 5.2.0 ipython 7.13.0 ipython_genutils 0.2.0 jupyter-client 6.1.2 jupyter-core 4.6.3 tornado 5.1.1

denisri commented 2 years ago

Using ipykernel<5.0.0 and tornado<5.0.0 solves the problem, but it's not a solution for the future...

denisri commented 2 years ago

Images 5.1 (ubuntu 20.04) have moved to 5.2 because of the numerous issues with this system - 5.1 will become a python3 variant of 5.0 (ubuntu 18.04). Thus this ticket now concerns images 5.2.

denisri commented 2 years ago

The new images 5.2 now install the right versions of modules and fix this problem.