Ubuntu

show() blocks in pylab mode with ipython 0.10.1

Reported by Johannes H. Jensen on 2011-05-04
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ipython (Ubuntu)
Undecided
Unassigned
Natty
Medium
Unassigned
Oneiric
Undecided
Unassigned

Bug Description

Binary package hint: ipython

From the upstream bug: https://github.com/ipython/ipython/issues/185

After updating to ipython 0.10.1 on 64-bit Linux, I noticed that plotting commands no longer automatically display anything when ipython is started with the -pylab option. Moreover, the show() command now appears to block in pylab mode.

This issue is fixed in the latest stable release of ipython: 0.10.2

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ipython 0.10.1-1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed May 4 22:37:33 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ipython
UpgradeStatus: Upgraded to natty on 2011-03-31 (33 days ago)

Johannes H. Jensen (joh) wrote :
description: updated
Julian Taylor (jtaylor) wrote :

this only affects the matplotlib GTK backend which is not used by default.
The default backend (TKAgg) works fine.

You can change backend by copying /etc/matplotlibrc to $HOME/.matplotlib/ and changing the "backend:" line

Changed in ipython (Ubuntu):
status: New → Confirmed
vincefn (vincent-favre-nicolin) wrote :

I also have this problem with ipython & natty.

Even if TkAgg works fine, not being able to use GTK(Agg) means that figures cannot be saved directly as jpg's - which is a problem when you want to save a lot (10000's) of 2D plots without using too much disk space.

Also, I can't seem to be able tu use the wx backend either..

Is there any other workaround ? Another ipython version ?

Julian Taylor (jtaylor) wrote :

png is supported which is lossless and compresses very well unless your plotting photos.
You can convert these to jpg later with e.g. the convert command from imagemagick.

I have 0.10.2 in my ppa:
https://launchpad.net/~jtaylor/+archive/ipython
but it may get replaced by 0.11 soon. which will introduce many new bugs so you may want to pin the version

vincefn (vincent-favre-nicolin) wrote :

Answering my own query: apparently installing ipython 0.10.2 (from oneiric) fixes the issue:

http://launchpadlibrarian.net/70857487/ipython_0.10.2-1_all.deb

Is there any chance this could be pushed as an update for natty (when installing, no dependency conflict appeared) ?

vincefn (vincent-favre-nicolin) wrote :

> png is supported which is lossless and compresses very well unless your plotting photos.

 Unfortunately I am plotting images recorded from 2D detectors, so compression is not that good with png (yes I can post-convert to jpg but I'd rather avoid that sort of kludge).

> I have 0.10.2 in my ppa:
> https://launchpad.net/~jtaylor/+archive/ipython
> but it may get replaced by 0.11 soon. which will introduce
> many new bugs so you may want to pin the version

  Since ipython 0.10.1 also induces problems with mayavi's mlab when using 'ipython -wthread' (see discussion in https://bugs.launchpad.net/bugs/776078), I think it would *really* be great to push 0.10.2 to natt.

 I'm currently giving lectures about using python for scientific computing and the thread issue is not giving a very enjoyable experience of ipython to the student using nattys (which is a real pity, because it's clearly indispensable for scientific plotting in 1D/2D/3D).

Julian Taylor (jtaylor) wrote :

If you think it qualifies for a SRU have a look here: https://wiki.ubuntu.com/StableReleaseUpdates
Better ask the release team for an Ok before backporting the fix.

Or you could do a backport:
https://help.ubuntu.com/community/UbuntuBackports

vincefn (vincent-favre-nicolin) wrote :

I really believe this qualifies for an SRU:

* the thread-handling of ipython represents a large part of its added value compared to a standard python console
* it affects matplotlib, although a workaround using a different backend is possible, it removes some functionality (described in this bug https://bugs.launchpad.net/bugs/777420)
* it affects mayavi/mlab, and no workaround exists (you lose the ability to use the console while the GUI is functional) (bug report https://bugs.launchpad.net/bugs/776078)

Also:
* the bug is well described and has been corrected upstream (https://github.com/ipython/ipython/issues/185)
* only one package (ipython) needs to be upgraded, no additional dependency needs be updated in natty
* all that is needed is to use the package already in oneiric

TEST CASE:
1) install ipython, python-enthoughtbase, mayavi2
2) Start "ipython -wthread", then use the following two commands:
from enthought.mayavi import mlab
mlab.test_contour3d()

=> the GUI window is unresponsive unless the 'show()' command is passed - this is fixed by the new package (see upstream report)
END TEST CASE

So I think this is a really good case for a SRU...

It is very similar to what was reported for https://bugs.launchpad.net/bugs/776078, which was quickly fixed by a SRU, so I hope it can be done here too.

I don't think a backport would be appropriate- keeping 0.10.1 in the main tree would only create problems for many users who won't find the backport repository.

Who can push this for a SRU ?

Micah Gersten (micahg) wrote :

Apparently fixed in 0.10.2, so marking Fix Released for oneiric

tags: added: regression-release
Changed in ipython (Ubuntu Oneiric):
status: Confirmed → Fix Released
Changed in ipython (Ubuntu Natty):
importance: Undecided → Medium
status: New → Triaged
Barry Warsaw (barry) wrote :

I'll sponsor the upload to natty-proposed and subscribe ubuntu-sru. The patch in the merge proposal works for me and looks good. Thanks for your contribution to Ubuntu!

Barry Warsaw (barry) wrote :

Oh, please be sure to test the package in natty-proposed once it's uploaded. See the SRU link above for details.

Barry Warsaw (barry) on 2011-06-02
Changed in ipython (Ubuntu Natty):
status: Triaged → In Progress
tags: added: verification-needed
removed: running-unity
tags: removed: amd64 apport-bug

Accepted ipython into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ipython (Ubuntu Natty):
status: In Progress → Fix Committed

Thanks for the quick upload !

This looks OK, I installed the new package using:
wget http://archive.ubuntu.com/ubuntu/pool/universe/i/ipython/ipython_0.10.1-1ubuntu0.1_all.deb
dpkg -i ipython_0.10.1-1ubuntu0.1_all.deb

And with this new version, both ipython -pylab and ipython -wthread seem to work fine (i.e. graphical windows are interactive, with the python console also accepting input), using matplotlib and mayavi.mlab.

ipython still reports 0.10.1 version, but seems to work as if it is the corrected 0.10.2 version.

Barry Warsaw (barry) wrote :

vincefn: right, this isn't 0.10.2, but just 0.10.1 with a backported patch to fix just the immediate problem. Thanks for testing it!

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ipython - 0.10.1-1ubuntu0.1

---------------
ipython (0.10.1-1ubuntu0.1) natty-proposed; urgency=low

  * add patch to fix blocking show (LP: #777420)
 -- Julian Taylor <email address hidden> Wed, 25 May 2011 13:15:38 +0200

Changed in ipython (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers