Open ZGainsforth opened 8 years ago
@jdmarch, does Canopy still uses PySide?
@ccordoba12 yes, for now the Canopy GUI (hence its QtConsole frontend) still uses PySide, with IPython 2.4. However it sounds as if @ZGainsforth is working from Terminal, where either PyQt4 or PySide is available.
I don't think I've changed any settings from the default. How do I check which is in use?
If you don't have the pyqt
package installed (check enpkg -s pyqt
), then you are using pyside. If you do, I don't know offhand which is the default, but you can force either one by setting environment variable QT_API
to pyside
or pyqt
.
From bash I entered:
export QT_API=“pyqt”
Then I ran jupyter qtconsole and the problem continues unchanged.
On Feb 22, 2016, at 8:21 PM, Jonathan March notifications@github.com wrote:
If you don't have the pyqt package installed (check enpkg -s pyqt), then you are using pyside. If you do, I don't know offhand which is the default, but you can force either one by setting environment variable QT_API to pyside or pyqt.
— Reply to this email directly or view it on GitHub https://github.com/jupyter/qtconsole/issues/103#issuecomment-187518514.
And if you specify pyside?
Yeah, just tried it and also same result. So that’s probably not the cause.
On Feb 22, 2016, at 8:36 PM, Jonathan March notifications@github.com wrote:
And if you specify pyside?
— Reply to this email directly or view it on GitHub https://github.com/jupyter/qtconsole/issues/103#issuecomment-187523654.
Try updating both IPython and the Qt console (qtconsole 4.2 was just released) to see if that makes any difference.
The Qt console now asks the kernel when you press enter whether it should execute the code or prompt for another line - an is_complete
request. This was necessary because making that decision depends on the programming language, and previously the Qt console hard-coded logic about Python. However, if the kernel fails to reply promptly for some reason, the frontend doesn't know what to do, so it will keep adding lines until you force it with shift-enter.
Does this happen regardless of what you're running, or are you doing something specific when it happens?
After pip install -U jupyter ipython qtconsole, the problem persists.
OS X 10.11.3 Jupyter QtConsole 4.2.0 Python 2.7.10 | 64-bit | (default, Oct 21 2015, 09:09:19) IPython 4.1.1 -- An enhanced Interactive Python.
It's not a good idea to mix installation methods for a single package (in this case Enthought eggs and pip install), so I have no idea what mix of component versions you may have now.
Ordinarily I would suggest that you delete your Canopy User Python environment (pointed to by sys.prefix
), rebuild it by restarting Canopy, then do enpkg --forceall ipython
. Given that this only happened after you updated Jupyter, this might resolve the problem in itself. (But it won't yet include the update to qtconsole 4.2, expected shortly in our repository). You'll also need to reinstall any 3rd party packages that you had already installed.
(Background in case the install name ipython
appears to you to be incorrect -- the ipython
egg is actually a pseudo-package that just brings in jupyter and all the jupyter dependencies, including the actual current ipython package, which lives in the ipython4
egg. :( This dance was put in place so that existing users could update ipython and end up with jupyter.)
OK. I reinstalled from scratch, back to versions:
Jupyter QtConsole 4.1.1 Python 2.7.10 | 64-bit | (default, Oct 21 2015, 09:09:19) IPython 4.0.1 -- An enhanced Interactive Python.
and behavior is still constant.
Given the earlier discussion between pyqt/pyside, I wonder if it is relevant that I have Qt Creator installed on the system? I haven't had trouble with Qt apps, but I thought I'd mention it.
QtCreator
If there are references to it in your environment variables, try removing those before starting QtConsole.
I don't see any references to it the printenv readout. Is there somewhere else I should look? It runs as an app, so it isn't invoked through the terminal.
You could try to run
jupyter qtconsole
from a terminal and see if that generates some further info on it.
I think that's what he's doing -- the issue only applies to qtconsole in terminal, since in qtconsole in the Canopy GUI it uses ipython 2.4.
That's correct. I am running it from the terminal. Is there another way?
Running just jupyter qtconsole
yields a QPixmap::scaled: Pixmap is a null pixmap
message.
Running jupyter qtconsole --debug
yields:
[JupyterQtConsoleApp] Config changed:
[JupyterQtConsoleApp] {'JupyterQtConsoleApp': {'log_level': 10}}
[JupyterQtConsoleApp] Searching [u'/Users/Zack', '/Users/Zack/.jupyter', '/Users/Zack/Library/Enthought/Canopy_64bit/User/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[JupyterQtConsoleApp] Looking for jupyter_config in /etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /usr/local/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /Users/Zack/Library/Enthought/Canopy_64bit/User/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /Users/Zack/.jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /Users/Zack
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /usr/local/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /Users/Zack/Library/Enthought/Canopy_64bit/User/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /Users/Zack/.jupyter
[JupyterQtConsoleApp] Loaded config file: /Users/Zack/.jupyter/jupyter_qtconsole_config.py
[JupyterQtConsoleApp] Config changed:
[JupyterQtConsoleApp] {'ZMQInteractiveShell': {'colors': 'Linux'}, 'IPKernelApp': {'exec_lines': ['from __future__ import division'], 'gui': 'qt4'}, 'JupyterWidget': {'editor': 'edit '}, 'JupyterQtConsoleApp': {'log_level': 10}}
[JupyterQtConsoleApp] Config changed:
[JupyterQtConsoleApp] {'ZMQInteractiveShell': {'colors': 'Linux'}, 'IPKernelApp': {'exec_lines': ['from __future__ import division'], 'gui': 'qt4'}, 'JupyterWidget': {'editor': 'edit '}, 'JupyterQtConsoleApp': {'log_level': 10}}
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /Users/Zack
[JupyterQtConsoleApp] Config changed:
[JupyterQtConsoleApp] {'ZMQInteractiveShell': {'colors': 'Linux'}, 'IPKernelApp': {'exec_lines': ['from __future__ import division'], 'gui': 'qt4'}, 'JupyterWidget': {'editor': 'edit '}, 'JupyterQtConsoleApp': {'log_level': 10}}
[JupyterQtConsoleApp] Connection File not found: /Users/Zack/Library/Jupyter/runtime/kernel-56716.json
[JupyterQtConsoleApp] Native kernel (python2) available from /Users/Zack/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/ipykernel/resources
[JupyterQtConsoleApp] Starting kernel: ['/Users/Zack/Library/Enthought/Canopy_64bit/User/bin/python', '-m', 'ipykernel', '-f', u'/Users/Zack/Library/Jupyter/runtime/kernel-56716.json']
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:57849
[JupyterQtConsoleApp] connecting shell channel to tcp://127.0.0.1:57846
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:57846
[JupyterQtConsoleApp] connecting iopub channel to tcp://127.0.0.1:57847
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:57847
[JupyterQtConsoleApp] connecting stdin channel to tcp://127.0.0.1:57848
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:57848
[JupyterQtConsoleApp] connecting heartbeat channel to tcp://127.0.0.1:57850
QPixmap::scaled: Pixmap is a null pixmap
[JupyterQtConsoleApp] Received history reply with 1000 entries
[JupyterQtConsoleApp] connecting shell channel to tcp://127.0.0.1:57846
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:57846
[JupyterQtConsoleApp] execute_input: {u'execution_count': 1, u'code': u'x = 5\n'}
[JupyterQtConsoleApp] execute: {u'status': u'ok', u'execution_count': 1, u'user_expressions': {}, u'payload': []}
I see some configuration options are loaded from
/Users/Zack/.jupyter/jupyter_qtconsole_config.py
Could comment those options and try again?
@jdmarch I see. You are correct. In the canopy editor:
[1] Import IPython [2] IPython.version_info
yields
Out[2]: (2, 4, 1, '')
And I am not experiencing the freezing issue. So there is a difference between these two. Also I haven't noticed freezing in the ipython console within PyCharm.
difference between these two.
Could you comment out those options and try again?
+1
I renamed the file so Jupyter doesn't see it on load. The problem persists, but the new debug output is:
[JupyterQtConsoleApp] Config changed:
[JupyterQtConsoleApp] {'JupyterQtConsoleApp': {'log_level': 10}}
[JupyterQtConsoleApp] Searching [u'/Users/Zack/.jupyter', '/Users/Zack/.jupyter', '/Users/Zack/Library/Enthought/Canopy_64bit/User/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[JupyterQtConsoleApp] Looking for jupyter_config in /etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /usr/local/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /Users/Zack/Library/Enthought/Canopy_64bit/User/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /Users/Zack/.jupyter
[JupyterQtConsoleApp] Looking for jupyter_config in /Users/Zack/.jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /usr/local/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /Users/Zack/Library/Enthought/Canopy_64bit/User/etc/jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /Users/Zack/.jupyter
[JupyterQtConsoleApp] Looking for jupyter_qtconsole_config in /Users/Zack/.jupyter
[JupyterQtConsoleApp] Config changed:
[JupyterQtConsoleApp] {'JupyterQtConsoleApp': {'log_level': 10}}
[JupyterQtConsoleApp] Connection File not found: /Users/Zack/Library/Jupyter/runtime/kernel-56834.json
[JupyterQtConsoleApp] Native kernel (python2) available from /Users/Zack/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/ipykernel/resources
[JupyterQtConsoleApp] Starting kernel: ['/Users/Zack/Library/Enthought/Canopy_64bit/User/bin/python', '-m', 'ipykernel', '-f', u'/Users/Zack/Library/Jupyter/runtime/kernel-56834.json']
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:58466
[JupyterQtConsoleApp] connecting shell channel to tcp://127.0.0.1:58463
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:58463
[JupyterQtConsoleApp] connecting iopub channel to tcp://127.0.0.1:58464
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:58464
[JupyterQtConsoleApp] connecting stdin channel to tcp://127.0.0.1:58465
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:58465
[JupyterQtConsoleApp] connecting heartbeat channel to tcp://127.0.0.1:58467
QPixmap::scaled: Pixmap is a null pixmap
[JupyterQtConsoleApp] Received history reply with 1000 entries
[JupyterQtConsoleApp] connecting shell channel to tcp://127.0.0.1:58463
[JupyterQtConsoleApp] Connecting to: tcp://127.0.0.1:58463
[JupyterQtConsoleApp] execute_input: {u'execution_count': 1, u'code': u'x = 5\n'}
[JupyterQtConsoleApp] execute: {u'status': u'ok', u'execution_count': 1, u'user_expressions': {}, u'payload': []}
@jdmarch Thanks for the info. A quick workaround until this is fixed seems be to use the canopy ipython window instead of instantiating Jupyter from the command line. Progress! :-)
@ccordoba12 @jdmarch @takluyver Thanks for helping out with this guys.
Good, let's wait and see what happens when Qtconsole 4.2 is updated in the Canopy package repository (when it is available, you should update all of jupyter for consistency.)
Meanwhile, running qtconsole from within the Canopy editor gives you the advantage of being able to run directly from the editor, and being able to restart the kernel, among other things. You won't be missing much of the new stuff in jupyter, since most of that pertains to the notebook and to multi-language support.
@ZGainsforth I didn't see an answer to @takluyver's question?:
Does this happen regardless of what you're running, or are you doing something specific when it happens?
@jdmarch @takluyver It happens regardless. I don't even have to input any commands. I simply have to wait a few seconds first.
We've had some hanging/slowness issues with OS X before, but I think that was in terminal IPython, not in kernel/frontend things. But I also vaguely remember reports of new issues with the latest version of OS X, which I didn't pay much attention to.
For what is worth, no one has reported this problem in Spyder.
OK, I have more info now. I tried running jupyter console instead of qtconsole. The same error occurs, but now I get a useful error message:
WARNING: The kernel did not respond to an is_complete_request. Setting
use_kernel_is_completeto False.
And on the next command the hanging begins.
That's more or less what I'd expect, but from what you said about delays in execution as well, I think there's something just slowing down the kernel's responses for some reason.
I think this is very related to issue #76
Just installed Qtconsole 4.2 through canopy and the problem persists.
I just noticed I still have an .ipython directory and the config files we edited before were under .jupyter. I edited .ipython/profile_default/ipython_config.py and commented out the line:
c.InteractiveShellApp.pylab = 'osx'
And the problem disappeared. So apparently it is still pulling configuration from the .ipython directory?
IPython is still a thing - it provides the Jupyter kernel for Python. So things like pylab are still configured in the .ipython
directory. Jupyter is the language agnostic machinery for the messaging protocol, frontends and notebooks.
I see. Well, as far as I'm concerned this solves it for me. Though I suppose it is still a bug since one should be able to use the .ipython profile configuration file and choose defaults like pylab='osx' if those are intended to be used.
Do we want to leave this open then?
I think it's still a bug that the osx backend makes that happen. I personally have no idea how to fix it, but other people might.
I think Matplotlib guys are thinking to remove the OSX backend in the future.
Pinging @tacaswell about it.
We need to write an email to the mailing list, but unless someone volunteers it will go unmaintained.
I wish I had the qualifications to do that. I find it to be the only acceptable GUI backend on OS X. But I frankly don't do much GUI plotting with matplotlib anymore.
When input is stuck can you do these 2 tests:
If any of the two gives a new line then this is because the cursor position is out of sync. I have seen input getting stuck also on Windows, and having pylab
load automatically worsens the situation.
@minrk QtAgg does not work for you?
@ZGainsforth: (Seems like a side issue, but just to close the loop, QtConsole 4.2 and other contemporaneous jupyter packages) are now in the Enthought / Canopy repository for use at the command line, and, I expect, will be integrated in the Canopy 1.7.0 GUI, when released later this month.)
@tacaswell I don't want to sidetrack this issue, but macosx has always looked and behaved better than qtagg for me. Last I used it, qtagg figures didn't render in high-dpi.
That's right Min, qtagg doesn't support high-dpi screens, but that's fixed by using qt5agg (which will be added to Anaconda in a couple of months).
El 10/03/16 a las 17:24, Min RK escribió:
@tacaswell https://github.com/tacaswell I don't want to sidetrack this issue, but macosx has always looked and behaved better than qtagg for me. Last I used it, qtagg figures didn't render in high-dpi.
— Reply to this email directly or view it on GitHub https://github.com/jupyter/qtconsole/issues/103#issuecomment-195078656.
When I load qtconsole I can work normally for about 5-10 seconds. After that time, something occurs where enter attempts to continue the last line (as if I had been typing a for loop or similar). I can force execution using shift-enter. However, the console will hold for about 5-10 seconds before it actually executes the line. This occurs for every line -- and thus qtconsole becomes unusable and i'm force to use ipython from the command line. This is only new since the Jupyter qtconsole, the old IPython qtconsole worked fine.
Jupyter QtConsole 4.1.1 Python 2.7.10 | 64-bit | (default, Oct 21 2015, 09:09:19) IPython 4.0.1 OS X 10.11.3
Installed via Canopy.
This is perhaps related to #90 and #94, but I'm not using pandas, nor do I see QTextCursor messages in the debug output.