Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1060473 - ipython --pylab does not find matplotlib
Summary: ipython --pylab does not find matplotlib
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ipython
Version: 20
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-02 00:59 UTC by kyle
Modified: 2015-06-29 14:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 14:55:41 UTC


Attachments (Terms of Use)

Description kyle 2014-02-02 00:59:32 UTC
Description of problem:
ipython --pylab does not find matplotlib eventhough matplotlib is importable

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. ipython --pylab

Actual results:
Python 2.7.5 (default, Nov 12 2013, 16:45:54) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
ERROR: pylab mode doesn't work as matplotlib could not be found.
Is it installed on the system?
In [1]: import matplotlib

In [2]: 


Expected results:
Python 2.7.5 (default, Nov 12 2013, 16:45:54) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
Welcome to pylab, a matplotlib-based Python environment [backend: %s].
For more information, type 'help(pylab)'.
In [1]:

Additional info:
The problem is traceable to IPython/core/pylabtools.py line 244 which tries to import pylab from matplotlib. Trying this from within ipython returns 

In [3]: from matplotlib import pylab
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-71e6a9627589> in <module>()
----> 1 from matplotlib import pylab

/usr/lib64/python2.7/site-packages/matplotlib/pylab.py in <module>()
    267 from numpy.linalg import *
    268 
--> 269 from matplotlib.pyplot import *
    270 
    271 # provide the recommended module abbrevs in the pylab namespace

/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py in <module>()
     96 
     97 from matplotlib.backends import pylab_setup
---> 98 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
     99 
    100 

/usr/lib64/python2.7/site-packages/matplotlib/backends/__init__.pyc in pylab_setup()
     23         backend_name = 'matplotlib.backends.%s'%backend_name.lower()
     24     backend_mod = __import__(backend_name,
---> 25                              globals(),locals(),[backend_name])
     26 
     27     # Things we pull in from all backends

ImportError: No module named backend_qt4agg

Comment 1 Thomas Spura 2014-02-11 09:17:14 UTC
It seems this is a false positive, when guessing if matplotlib is installed or not.

It is installed, but not usable... This should have been fixed with the latest matplotlib update. Could you try that one?

Comment 2 Greg 2014-09-06 06:26:33 UTC
I am seeing the same matplotlib problem at launch. In addition numpy isn't being imported, either as itself or as np.
[gregm@feynman ~]$ ipython3 --pylab
Python 3.3.2 (default, Jun 30 2014, 12:45:18) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
ERROR: pylab mode doesn't work as matplotlib could not be found.
Is it installed on the system?
In [1]: import matplotlib

In [2]: x = numpy.array([1, 2])
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-e10881aabbc8> in <module>()
----> 1 x = numpy.array([1, 2])

NameError: name 'numpy' is not defined

In [3]: x = np.array([1, 2])
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-fb768a18c760> in <module>()
----> 1 x = np.array([1, 2])

NameError: name 'np' is not defined

In [4]: import numpy

In [5]: x = numpy.array([1, 2])

In [6]: 

Also, /usr/bin/iptest is failing the IPython.frontend test group while starting a terminal. qtconsole and notebook take almost a minute to start. notebook is never-ending stream of heartbeat errors and ipython kernel crashes. 

Same slow starting in ipython3, and test failures (/usr/bin/iptest3).

Fedora 19 system, up to date as of Sept. 6, 2014. Packages:
python-2.7.5-13.fc19.x86_64
python3-3.3.2-9.fc19.x86_64
python-matplotlib-1.2.0-14.fc19.x86_64
python3-zmq-13.0.0-1.fc19.x86_64
python3-zmq-tests-13.0.0-1.fc19.x86_64
python-zmq-13.0.0-1.fc19.x86_64
python-zmq-tests-13.0.0-1.fc19.x86_64
python3-ipython-0.13.2-4.fc19.noarch
python3-ipython-console-0.13.2-4.fc19.noarch
python3-ipython-gui-0.13.2-4.fc19.noarch
python3-ipython-notebook-0.13.2-4.fc19.noarch
python3-ipython-tests-0.13.2-4.fc19.noarch
python-ipython-0.13.2-4.fc19.noarch
python-ipython-console-0.13.2-4.fc19.noarch
python-ipython-doc-0.13.2-4.fc19.noarch
python-ipython-gui-0.13.2-4.fc19.noarch
python-ipython-notebook-0.13.2-4.fc19.noarch
python-ipython-tests-0.13.2-4.fc19.noarch
python3-numpy-1.7.2-8.fc19.x86_64
numpy-1.7.2-8.fc19.x86_64
numpy-f2py-1.7.2-8.fc19.x86_64

Whatever is wrong, it's common to python{2,3}, and it has made ipython notebooks unusable, and other backends slow.

Comment 3 Fedora End Of Life 2015-05-29 10:46:22 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2015-06-29 14:55:41 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.