FS#40723 - [python-matplotlib] Does not require python-pyqt4

Attached to Project: Community Packages
Opened by Daniel Hogan (dhogan) - Thursday, 05 June 2014, 21:38 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 22 June 2014, 15:44 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
python-matplotlib should not require python-pyqt4. See http://matplotlib.org/users/installing.html .

Steps to reproduce:
N/A
This task depends upon

Closed by  Felix Yan (felixonmars)
Sunday, 22 June 2014, 15:44 GMT
Reason for closing:  Not a bug
Comment by Doug Newgard (Scimmia) - Friday, 06 June 2014, 03:20 GMT
From the link you gave:
Optional
...
pyqt 4.0 or later
The Qt4 widgets library python wrappers for the Qt4Agg backend

Also see: https://bugs.archlinux.org/task/16778
Comment by Felix Yan (felixonmars) - Friday, 06 June 2014, 04:38 GMT
Actually, without python-pyqt4 installed, pyplot cannot be imported in the standard way:

$ python -c "import matplotlib.pyplot"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/matplotlib/pyplot.py", line 98, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/usr/lib/python3.4/site-packages/matplotlib/backends/__init__.py", line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/lib/python3.4/site-packages/matplotlib/backends/backend_qt4agg.py", line 13, in <module>
from .backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File "/usr/lib/python3.4/site-packages/matplotlib/backends/backend_qt4.py", line 25, in <module>
from .qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
File "/usr/lib/python3.4/site-packages/matplotlib/backends/qt4_compat.py", line 56, in <module>
from PyQt4 import QtCore, QtGui
ImportError: cannot import name 'QtCore'

I know that using other backends like matplotlib.use("GTKAgg") would make it work again, but I don't expect every program to change it - or do you have a better idea of how to set a global default backend?

Loading...