I recently installed PyQt4 on my system and started to perform some basic tasks (course work), it worked fine.
Then, after a few days, I tried to work with matplotlib.
When I tried import matplotlib.pyplot as plt, I get the following error:
Traceback (most recent call last):
File "C:\Users\user\Desktop\Confusion.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 114, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\__init__.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 16, in <module>
from .backend_qt5 import QtCore
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5.py", line 27, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 17, in <module>
import matplotlib.backends.qt_editor.formlayout as formlayout
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\formlayout.py", line 58, in <module>
from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\qt_compat.py", line 127, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets
RuntimeError: the sip module implements API v11.0 to v11.2 but the PyQt5.QtCore module requires API v11.3
[Finished in 1.9s]
I thought that the problem was related to the installation PyQt4, while I already had it PyQt5, but this site says that they can work together normally without any problems if they siphave the same version for both.
The problem seems to come from sip.
I followed these steps: PyQt5 - SIP API level 10 error. API 11 required
, sip.
, , ?
64- Windows 8, Anaconda3
.:)