Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing IPython graphics backend to "Qt" will result in error when using Qt5 #2792

Closed
yw5aj opened this issue Oct 31, 2015 · 10 comments
Closed

Comments

@yw5aj
Copy link

yw5aj commented Oct 31, 2015

Dear all,

Thanks to @stonebig for catching the bug on discussion at https://groups.google.com/forum/?fromgroups#!topic/winpython/QnSEg4hKxYE

Environment: Win 7 64 bit (I don't think it matters though)
Python 3.4 64 bit
Spyder 3.0.0dev (using Qt5)

How to reproduce:

Open spyder -> Tools -> Preferences -> IPython console -> Graphics -> Change the Backend from "Inline" to "Qt" -> restart spyder -> in the IPython QtConsole, enter import matplotlib.pyplot as plt

Error:

In [1]: import matplotlib.pyplot as plt

Traceback (most recent call last):



File "<ipython-input-1-eff513f636fd>", line 1, in <module>

import matplotlib.pyplot as plt



File "X:\WinPython3Qt5\python-3.4.3.amd64\lib\site-packages\matplotlib\pyplot.py", line 114, in <module>

_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()



File "X:\WinPython3Qt5\python-3.4.3.amd64\lib\site-packages\matplotlib\backends\__init__.py", line 32, in pylab_setup

globals(),locals(),[backend_name],0)



File "X:\WinPython3Qt5\python-3.4.3.amd64\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 18, in <module>

from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase



File "X:\WinPython3Qt5\python-3.4.3.amd64\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 15, in <module>

from .backend_qt5 import QtCore



File "X:\WinPython3Qt5\python-3.4.3.amd64\lib\site-packages\matplotlib\backends\backend_qt5.py", line 31, in <module>

from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__



File "X:\WinPython3Qt5\python-3.4.3.amd64\lib\site-packages\matplotlib\backends\qt_compat.py", line 124, in <module>

from PyQt4 import QtCore, QtGui



ImportError: No module named 'PyQt4'

stonebig pointed out that why this happend:

Doing this change, you get in the"spyder.ini file:
ets_backend = qt4

@ccordoba12
Copy link
Member

@stonebig, what do you think we need to do to fix this problem? Removing the ets_backend option?

@stonebig
Copy link
Contributor

stonebig commented Nov 4, 2015

Hi Carlos,

I don't feel expert on this.

I would suggest that this option (and current 'Qt4' value), if kept, should be understood as "use the default Qt", this one being Qt4 or Qt5.

Qt4 and Python 2.7 / 3.3 are already out of my (maintenance) mind, so you may as well switch to Qt5 only on this option.

@ccordoba12
Copy link
Member

So ETS is available for Qt5 too?

@ccordoba12
Copy link
Member

I think last time I checked it wasn't

@stonebig
Copy link
Contributor

stonebig commented Nov 5, 2015

What is ETS ?

@ccordoba12 ccordoba12 changed the title Changing IPython graphics backend to "Qt" will result in error Changing IPython graphics backend to "Qt" will result in error when using Qt5 Nov 16, 2015
@ccordoba12
Copy link
Member

@stonebig, don't worry. I found where the error was (and it wasn't related to ETS = Entought Tool Suite).

@stonebig
Copy link
Contributor

stonebig commented Dec 3, 2015

great !

@stonebig
Copy link
Contributor

stonebig commented Dec 3, 2015

hope you will soon do a 3.0.0 beta2 to celebrate this

@ccordoba12
Copy link
Member

Yep, I only have to solve issue #2748 before releasing it.

@stonebig
Copy link
Contributor

(silent hope)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants