0

On installation of PyQt5 i'm unable to launch Spyder on Windows. When i tried to launch through the conda prompt, i get the following error,

File "C:\Users\sarshetty\Anaconda3\lib\site-packages\qtpy\__init__.py", line 132, in <module>
    from PyQt5.QtCore import PYQT_VERSION_STR as PYQT_VERSION  # analysis:ignore
RuntimeError: the sip module implements API v12.0 to v12.7 but the PyQt5.QtCore module requires API v12.8

I see the following for my sip and PyQt in the python terminal.

>>> import sip
>>> sip.SIP_VERSION_STR
'4.19.8'
>>> import PyQt5
>>> import PyQt5.Qt
>>> import PyQt5.QtCore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: the sip module implements API v12.0 to v12.7 but the PyQt5.QtCore module requires API v12.8

I tried upgrading my sip, however that has not helped. Can anyone tell me what is happening and how i can resolve this.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
sarvotham
  • 11
  • 2
  • 3

4 Answers4

1

This fixed the issue for me

  1. Uninstall the installed PyQt5 library with pip
pip3 uninstall pyqt5
  1. Install PyQt5 with conda
conda install -c anaconda pyqt
0

I'm only guessing here but I think the error is referring to PyQt5-sip since the newest release is version 12.8.0

https://pypi.org/project/PyQt5-sip/

Shilo
  • 313
  • 3
  • 16
0

(Spyder maintainer here) Anaconda comes with its own version of PyQt5, so you don't need to install it by running pip install pyqt5 (which seems you did).

By doing that, you basically broke Anaconda and now you have to remove and reinstall it, sorry.

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
0

Uninstall pyqt5(pip uninstall pyqt5) and then reinstall it version 5.11.3(pip install pyqt5==5.11.3) After installing the new version it'll show an error msg but it will work anyways. This has worked for me and my colleges.