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

Qtconsole not working on Windows and Python 3.8 #405

Closed
ericpre opened this issue Jan 25, 2020 · 7 comments · Fixed by #406
Closed

Qtconsole not working on Windows and Python 3.8 #405

ericpre opened this issue Jan 25, 2020 · 7 comments · Fixed by #406
Milestone

Comments

@ericpre
Copy link
Contributor

ericpre commented Jan 25, 2020

Similar to #400.

Step to reproduce:

conda create -n py38 python
conda activate py38
conda install qtconsole
jupyter qtconsole

Gives the following error:

ERROR:tornado.application:Exception in callback functools.partial(<function ThreadedZMQSocketChannel.__init__.<locals>.setup_stream at 0x000002079F95B4C0>)
Traceback (most recent call last):
  File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\site-packages\tornado\ioloop.py", line 743, in _run_callback
    ret = callback()
  File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\site-packages\jupyter_client\threaded.py", line 48, in setup_stream
    self.stream = zmqstream.ZMQStream(self.socket, self.ioloop)
  File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\site-packages\zmq\eventloop\zmqstream.py", line 127, in __init__
    self._init_io_state()
  File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\site-packages\zmq\eventloop\zmqstream.py", line 546, in _init_io_state
    self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)
  File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler
    self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\asyncio\events.py", line 501, in add_reader
    raise NotImplementedError
NotImplementedError

I don't know where it needs to be fixed and if qtconsole needs a similar fix to the PRs below:
tornadoweb/tornado#2608
jupyter/notebook#5047
ipython/ipykernel#456

conda info:


     active environment : py38
    active env location : C:\Users\Eric\Miniconda3\envs\py38
            shell level : 2
       user config file : C:\Users\Eric\.condarc
 populated config files : C:\Users\Eric\.condarc
          conda version : 4.8.2
    conda-build version : 3.18.11
         python version : 3.7.4.final.0
       virtual packages : __cuda=10.1
       base environment : C:\Users\Eric\Miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\Eric\Miniconda3\pkgs
                          C:\Users\Eric\.conda\pkgs
                          C:\Users\Eric\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\Eric\Miniconda3\envs
                          C:\Users\Eric\.conda\envs
                          C:\Users\Eric\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.18362
          administrator : False
             netrc file : None
           offline mode : False

conda list

# packages in environment at C:\Users\Eric\Miniconda3\envs\py38:
#
# Name                    Version                   Build  Channel
backcall                  0.1.0                      py_0    conda-forge
ca-certificates           2019.11.28           hecc5488_0    conda-forge
certifi                   2019.11.28               py38_0    conda-forge
colorama                  0.4.3                      py_0    conda-forge
decorator                 4.4.1                      py_0    conda-forge
entrypoints               0.3                   py38_1000    conda-forge
icu                       64.2                 he025d50_1    conda-forge
ipykernel                 5.1.3            py38h5ca1d4c_0    conda-forge
ipython                   7.11.1           py38h5ca1d4c_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.15.2                   py38_0    conda-forge
jpeg                      9c                hfa6e2cd_1001    conda-forge
jupyter_client            5.3.4                    py38_1    conda-forge
jupyter_core              4.6.1                    py38_0    conda-forge
libclang                  9.0.1           default_hf44288c_0    conda-forge
libpng                    1.6.37               h7602738_0    conda-forge
libsodium                 1.0.17               h2fa13f4_0    conda-forge
openssl                   1.1.1d               hfa6e2cd_0    conda-forge
parso                     0.5.2                      py_0    conda-forge
pickleshare               0.7.5                 py38_1000    conda-forge
pip                       20.0.2                   py38_0    conda-forge
prompt_toolkit            3.0.2                      py_0    conda-forge
pygments                  2.5.2                      py_0    conda-forge
pyqt                      5.12.3           py38h6538335_1    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
python                    3.8.1                he1f5543_1    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
pywin32                   225              py38hfa6e2cd_0    conda-forge
pyzmq                     18.1.1           py38h16f9016_0    conda-forge
qt                        5.12.5               h7ef1ec2_0    conda-forge
qtconsole                 4.6.0                      py_0    conda-forge
setuptools                45.1.0                   py38_0    conda-forge
six                       1.14.0                   py38_0    conda-forge
sqlite                    3.30.1               hfa6e2cd_0    conda-forge
tornado                   6.0.3            py38hfa6e2cd_0    conda-forge
traitlets                 4.3.3                    py38_0    conda-forge
vc                        14.1                 h0510ff6_4  
vs2015_runtime            14.16.27012          hf0eaf9b_1  
wcwidth                   0.1.8                      py_0    conda-forge
wheel                     0.33.6                   py38_0    conda-forge
wincertstore              0.2                   py38_1003    conda-forge
zeromq                    4.3.2                h6538335_2    conda-forge
zlib                      1.2.11            h2fa13f4_1006    conda-forge

@ccordoba12
Copy link
Collaborator

ccordoba12 commented Jan 25, 2020

This is not an issue that can be solved here.

@ericpre
Copy link
Contributor Author

ericpre commented Jan 25, 2020

Thanks for the quick reply @ccordoba12. Do you know where it should be fixed?

Does the same apply to #400?

@ccordoba12
Copy link
Collaborator

According to ipython/ipykernel#456, the problem is already solved but a new release of ipykernel is pending.

@ericpre
Copy link
Contributor Author

ericpre commented Jan 25, 2020

I have tried to use the master branch of https://github.com/ipython/ipykernel and I still have the same issue. I will check cross time and raise the issue there if this is confirmed.

@ccordoba12
Copy link
Collaborator

Then you could open an issue in pyzmq because the error seems to be originating there:

File "C:\Users\Eric\Miniconda3\envs\py38qt\lib\site-packages\zmq\eventloop\zmqstream.py", line 546, in _init_io_state
    self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)

@ericpre
Copy link
Contributor Author

ericpre commented Jan 29, 2020

Accordingly to tornadoweb/tornado#2608 (comment) and to ipython/ipykernel#480 (comment), the fix needs to be introduce earlier enough, typically when the app object is created. Would it be sensible to introduce the fix in

self.app = QtWidgets.QApplication(['jupyter-qtconsole'])

@ccordoba12
Copy link
Collaborator

I have no idea, sorry.

@ccordoba12 ccordoba12 reopened this May 7, 2020
@ccordoba12 ccordoba12 added this to the 4.8.0 milestone May 7, 2020
@ccordoba12 ccordoba12 changed the title qtconsole not working on windows and python 3.8 Qtconsole not working on Windows and Python 3.8 May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants