Pyqt5 Error "Pycapsule_Getpointer Called with Incorrect Name"

ValueError:PyCapsule_GetPointer called with incorrect name with from PyQt5.QtWebEngineWidgets import QWebEnginePage

The solution is to downgrade PyQt5.

pip install PyQt5==5.10.1
Collecting PyQt5==5.10.1
Downloading https://files.pythonhosted.org/packages/a7/22/67cc2bac6ae2cd3a7eabb2a2e91638b94bdc6e0503747e49670ce44bb5b0/PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-none-win_amd64.whl (81.0MB)
100% |████████████████████████████████| 81.0MB 187kB/s
Requirement already satisfied: sip<4.20,>=4.19.4 in c:\anaconda3\lib\site-packages (from PyQt5==5.10.1) (4.19.8)
spyder 3.3.4 requires pyqtwebengine<5.13, which is not installed.
Installing collected packages: PyQt5
Found existing installation: PyQt5 5.12.1
Uninstalling PyQt5-5.12.1:
Successfully uninstalled PyQt5-5.12.1
Successfully installed PyQt5-5.10.1

This problem occurs because the PyQt5 I installed is beyond version as the version of spyder.

PyQt5 error PyCapsule_GetPointer called with incorrect name

OK so this was pretty easy actually, as stated in the doc (PyQt4, PyQt5), SIP must be configured with the --sip-module option, so for PyQt5 I did:

python configure.py --sip-module PyQt5.sip --no-tools

and for PyQt4:

python configure.py --sip-module PyQt4.sip --no-tools

This applies for PyQt >= 4.12.2 and PyQt >= 5.11

EDIT:
PyQt5 now has the so called PyQt-builder, see the PyQt5 doc

PyQt4 Error ValueError: PyCapsule_GetPointer called with incorrect name only in debug mode

I was having the same issue, while I'm not sure if this is the best solution, what worked for me was to uninstall all of my python packages and reinstall everything.

To get all of your packages

pip freeze > requirements.txt

Remove them all at once

pip uninstall -r requirements.txt -y

Or remove one by one (This might be better because you can pick and choose which to uninstall if you want)

pip uninstall -r requirements.txt

Then reinstall PyQt4 using the .whl file and whatever other packages you need again.

This might be overkill, but it worked for me. I had both PyQt4 and PyQt5 installed as well as PyQt5-sip. The issue might be coming from having both the 4 and 5 packages installed? I'm not sure since I didn't try removing the PyQt5 and seeing if that fixed anything.



Related Topics



Leave a reply



Submit