You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ipython in terminal freezes on OS X El Capitan #9128
I installed ipython 4.0.1 from macports on OS X El Capitan. The interactive ipython terminal regularly freezes for a while in a way that is reminiscent of what I remember from a few years ago, that I thought was fixed with #6325. It eventually recovers, usually if I focus on another window for a while.
I understand, but it is weird that it didn't occur previously.
I tested a few more things: it only occurs when I press and hold left or right cursor (not when I repeatedly hit it), and I can free it by doing Ctrl-e or Ctrl-a etc or repeatedly clicking in and out of the terminal (though this latter way is variably successful).
I have the same problem after upgrading to El Capitan, both in Terminal.app and in xterm. If I run ipython without --pylab (no OSX backend), the python command line freezes every now and then, but Ctrl+C causes keyboard interrupt and it recovers. With --pylab and matplotlib OSX backend enabled, Ctrl+C does nothing, only killing the process works (or I haven't had the patience to wait long enough).
For me it doesn't require any arrow keys, just normal writing (typically fast) does the trick.
So, for me it seems that there's a problem with the ipython command line (readline?) and it would somehow clash with some other event loop if OSX backend is active ... just guessing ...
I might have the same problem. If I press and hold any key (arrows or letters) the input freezes. Although if I hit CTRL+C the input unfreezes, I and can continue to type. The problem only happens if matplotlib is loaded (invoke with $> ipython --matplotlib or %matplotlib after loading).
The problem seems related to the Keyboard -> Key Repeat setting in the System Preferences. I only experience the keyboard freeze using the two fastest settings. By setting to the third fastest, the problem goes way (see figure).
I am running:
Python 3.5.1
IPython 4.0.1
Matplotlib 1.5.1
MacOS 10.11.3
But meanwhile I have noticed that even with --pylab when the command line freezes, hitting Ctrl-C followed by Enter works. So, now I don't need to kill the whole ipython session anymore and can actually work somehow (although it is still really annoying).
I've been having the same issue for a couple weeks now. I am always able to unlock it by hitting <CTRL-C> then <enter>. Whatever had been displayed before is in the history, so I can get back to where I was with <up>, but my session is littered with:
In [56]: xy =
KeyboardInterrupt
In [56]: xy = vor.points
In [57]: from scipy.spa
scipy.spacing scipy.sparse scipy.spatial
In [57]: from scipy.spatial import
KeyboardInterrupt
In [57]: from scipy.spatial import Co
KeyboardInterrupt
In [57]: from scipy.spatial import ConvexHull
So far, this is all I can gather:
Problem occurs if I run ipython --pylab or if I run ipython then later run %matplotlib, but so far I think not otherwise.
When it does occur, I can always free the interface and get the prompt back with <CTRL-C><enter>, but nothing else has worked. I tried other suggestions from this issue page, but <CTRL-A> and <CTRL-E> do not work. Waiting (for a few minutes) and clicking in and out of the terminal do not work.
It happens without using arrow keys, just alphanumeric keys are sufficient. However, it seems to only happen when I'm typing the start of something defined. That is, if I jam keys randomly, it is fine, but if I type np it can freeze. This is not so certain, and hard to test since the freezing is inconsistent. It can happen when hitting <Tab> as well, which is especially annoying, since I first think <Tab> is doing nothing because I've misspelled something so no completion exists, but it turns out it's frozen, so I have to hit <CTRL-C><enter><up>, then <Tab> works.
My keyboard repeat rate and delay are both set to the fastest setting. However, holding any keys down or typing randomly really fast do not induce the problem. I also have the problem happen at the settings shown in @rrbarbosa 's image.
Here's all the information that I can think of to provide:
Just wanted to add my input as a OS X 10.11...I thought it was just me. I've been using Anaconda 2.4.0 Python 3.x for more than a year without ever seeing this problem. This week was the first time I started getting back into matplotlib, and every time I startup ipython, I run into it. Like @leewalsh, I'm only able to get out with Ctrl-C.
I'm running ipython without any flags. The hiccups happen as soon as I run the magic command, %matplotlib...the freezing will just hit as I'm in the middle of typing out a line of code.
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
>>>sys.version# 3.5.1 |Anaconda 2.4.0 (x86_64)| (default, Dec 7 2015, 11:24:55) # [GCC 4.2.1 (Apple Inc. build 5577)]>>>platform.platform()
'Darwin-15.3.0-x86_64-i386-64bit'>>>os.uname()
# posix.uname_result(sysname='Darwin', nodename='DN.Net', release='15.3.0', # version='Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; # root:xnu-3248.30.4~1/RELEASE_X86_64', machine='x86_64')
@Carreau, lots of information has been provided since you tagged this as needs-info. I understand if nobody has had time to look into this, but can you clarify whether we still need more info? If so, what kind of info would be helpful? I am happy to dig further but I don't know where to look. Or maybe do you think it's a matplotlib problem, not ipython?
I can remove the need-info, but yes, here we really need to figure out why it does that.
It might be a matplotlib event loop integration issue, but I'm not sure why.
Has @tacaswell or @minrk seen that and have an idea ? I'm unfamiliar with the event loop code, so the answer might be obvious to one of them, but not for me.
@leewalsh I won't have time in the next week to properly confirm this but given how abruptly this issue popped up for a specific group of users, I won't at all be surprised if it is obsoleted in 5.0. Thanks for checking it out!
Activity
jtravs commentedon Jan 14, 2016
This seems (but I'm not totally sure) to only occur when I use the left/right cursor keys to edit a line.
Carreau commentedon Jan 16, 2016
Hum... the left/right things is purely handled by readline. I'm not sure there is much we can do.
jtravs commentedon Jan 16, 2016
I understand, but it is weird that it didn't occur previously.
I tested a few more things: it only occurs when I press and hold left or right cursor (not when I repeatedly hit it), and I can free it by doing Ctrl-e or Ctrl-a etc or repeatedly clicking in and out of the terminal (though this latter way is variably successful).
Carreau commentedon Jan 18, 2016
hum... could it be a repetition thing on OS X? or the emoji-pop-up-dialog ?
Terminal.app or iTerm ?
mseppa commentedon Jan 26, 2016
I have the same problem after upgrading to El Capitan, both in Terminal.app and in xterm. If I run ipython without --pylab (no OSX backend), the python command line freezes every now and then, but Ctrl+C causes keyboard interrupt and it recovers. With --pylab and matplotlib OSX backend enabled, Ctrl+C does nothing, only killing the process works (or I haven't had the patience to wait long enough).
For me it doesn't require any arrow keys, just normal writing (typically fast) does the trick.
So, for me it seems that there's a problem with the ipython command line (readline?) and it would somehow clash with some other event loop if OSX backend is active ... just guessing ...
rrbarbosa commentedon Feb 25, 2016
I might have the same problem. If I press and hold any key (arrows or letters) the input freezes. Although if I hit CTRL+C the input unfreezes, I and can continue to type. The problem only happens if matplotlib is loaded (invoke with
$> ipython --matplotlibor%matplotlibafter loading).The problem seems related to the Keyboard -> Key Repeat setting in the System Preferences. I only experience the keyboard freeze using the two fastest settings. By setting to the third fastest, the problem goes way (see figure).
I am running:
Python 3.5.1
IPython 4.0.1
Matplotlib 1.5.1
MacOS 10.11.3
mseppa commentedon Feb 25, 2016
Changing the repeat setting didn't help for me.
But meanwhile I have noticed that even with --pylab when the command line freezes, hitting Ctrl-C followed by Enter works. So, now I don't need to kill the whole ipython session anymore and can actually work somehow (although it is still really annoying).
leewalsh commentedon Mar 8, 2016
I've been having the same issue for a couple weeks now. I am always able to unlock it by hitting
<CTRL-C>then<enter>. Whatever had been displayed before is in the history, so I can get back to where I was with<up>, but my session is littered with:So far, this is all I can gather:
ipython --pylabor if I runipythonthen later run%matplotlib, but so far I think not otherwise.<CTRL-C><enter>, but nothing else has worked. I tried other suggestions from this issue page, but<CTRL-A>and<CTRL-E>do not work. Waiting (for a few minutes) and clicking in and out of the terminal do not work.npit can freeze. This is not so certain, and hard to test since the freezing is inconsistent. It can happen when hitting<Tab>as well, which is especially annoying, since I first think<Tab>is doing nothing because I've misspelled something so no completion exists, but it turns out it's frozen, so I have to hit<CTRL-C><enter><up>, then<Tab>works.Here's all the information that I can think of to provide:
dannguyen commentedon Mar 19, 2016
Just wanted to add my input as a OS X 10.11...I thought it was just me. I've been using Anaconda 2.4.0 Python 3.x for more than a year without ever seeing this problem. This week was the first time I started getting back into matplotlib, and every time I startup ipython, I run into it. Like @leewalsh, I'm only able to get out with Ctrl-C.
I'm running ipython without any flags. The hiccups happen as soon as I run the magic command,
%matplotlib...the freezing will just hit as I'm in the middle of typing out a line of code.leewalsh commentedon Mar 24, 2016
I can add another data point. On my laptop running Yosemite I have never encountered this problem. Here are the config for that:
leewalsh commentedon Mar 24, 2016
@Carreau, lots of information has been provided since you tagged this as
needs-info. I understand if nobody has had time to look into this, but can you clarify whether we still need more info? If so, what kind of info would be helpful? I am happy to dig further but I don't know where to look. Or maybe do you think it's a matplotlib problem, not ipython?Carreau commentedon Mar 24, 2016
I can remove the
need-info, but yes, here we really need to figure out why it does that.It might be a matplotlib event loop integration issue, but I'm not sure why.
Has @tacaswell or @minrk seen that and have an idea ? I'm unfamiliar with the event loop code, so the answer might be obvious to one of them, but not for me.
tacaswell commentedon Mar 24, 2016
The thing @leewalsh reports with strange inputs may be related to a bug in readline. Try hitting
ctrl-gto see if that helps?3 remaining items
stefan-pdx commentedon Apr 28, 2016
I have the same problem in El Capitan. I found by:
ctrl-Zwhen IPython is unresponsivefgto bring the process back to the foregroundctrl-Cfollowed by Enter to generate aKeyboardInterruptexceptionis the fastest way to getting back to the interactive prompt. However, IPython becomes unresponsive after a few minutes.
tacaswell commentedon Apr 28, 2016
what matplotlib backends is everyone using? This is starting to sound like issues with
PyOS_InputHookleewalsh commentedon Apr 28, 2016
Using matplotlib backend: MacOSX
tacaswell commentedon Apr 28, 2016
Can you reproduce this with qtagg?
rhdtownsend commentedon Apr 28, 2016
Yep, me too…
mseppa commentedon May 2, 2016
I've been running ipython with Qt4Agg for a while now and there have been no freezes. So, for me it seems to be MacOSX specific problem.
carhartl commentedon May 2, 2016
I've been seeing that with using matplotlib backend Qt4Agg (running inside a docker container on OSX).
leewalsh commentedon Jul 23, 2016
For what it's worth, this issue seems to have disappeared with the magnificent and glorioius
IPython 5.0. I vote to close.dannguyen commentedon Jul 23, 2016
@leewalsh I won't have time in the next week to properly confirm this but given how abruptly this issue popped up for a specific group of users, I won't at all be surprised if it is obsoleted in 5.0. Thanks for checking it out!
takluyver commentedon Jul 23, 2016
Closing - we can reopen it if it turns out it wasn't completely fixed.
iskandr commentedon May 29, 2017
I'm having this problem after upgrading to IPython 6.0 on Yosemite. Since readline got upgraded I'm guessing the problem is there.
takluyver commentedon May 30, 2017
As we moved away from readline, I'd guess that you're seeing a similar but different problem.
iskandr commentedon May 30, 2017