2

I upgraded from QGIS 3.2 to 3.4 and bad things happened. On start-up I get the error.

Couldn't load SIP module. Python support will be disabled.

Traceback (most recent call last): File "", line 1, in File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis__init__.py", line 80, in import qgis.gui File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\gui__init__.py", line 27, in from qgis._gui import * ValueError: PyCapsule_GetPointer called with incorrect name

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]

QGIS version: 3.4.2-Madeira 'Madeira', 22034aa070

Python path: ['C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python', 'C:/Users/Cary/AppData/Roaming/QGIS/QGIS3\profiles\default/python', 'C:/Users/Cary/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins', 'C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins', 'C:\Program Files\QGIS 3.4\bin\python37.zip', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37\DLLs', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib', 'C:\Program Files\QGIS 3.4\bin', 'C:\Users\Cary\AppData\Roaming\Python\Python37\site-packages', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\win32', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\Pythonwin']

I feel that there is an issue with my Python Path but I've tried several things to fix it and I am not there yet.

Does anyone know a fix for this?

  • ** From bad to worse after an uninstall and reinstall. ** An error occurred during execution of following code: qgis.utils.initInterface(1797760070112) Traceback (most recent call last): File "", line 1, in File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\qgis\utils.py", line 219, in initInterface iface = wrapinstance(pointer, QgisInterface) TypeError: wrapinstance() argument 2 must be sip.wrappertype, not sip.wrappertype Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.4.2-Madeira 'Madeira', 22034aa070 – Cary H Dec 20 '18 at 13:41
  • I am in a vicious circle of uninstalling / installing QGIS 3.4.3 to be able to run plugins and installing PyQt5. When I uninstall both of them and reinstall QGIS i cannot build with pb_tool due to something wrong with pyrcc5 and I have to pip install PyQt5. Then I get "QGIS 3.4 Couldn't load SIP module. Python support will be disabled on Windows 10". Is there some magic version of PyQt5 that makes this all work? – Cary H Dec 28 '18 at 19:04
1

I encountered this problem on Ubuntu 18.04 with QGIS-Madeira 3.4.13 after installing PyQt5. I didn't put it in virtual environment because I didn't anticipate there would be any issues; it must have overwritten PyQt4 and the older version of sip, as there is a special version associated with PyQt5. I was able to fix the issues with QGIS by uninstalling PyQt5's sip (and PyQt5, which could always be re-installed properly within a virtual environment), then re-installing sip system-wide (in the environment in which QGIS looks for it).

In the example below, I am making sure to use the Python 3 pip as I have both Python 2 and 3 on my system.

sudo -H pip3 uninstall PyQt5-sip
sudo -H pip3 uninstall PyQt5

# This seems to be the Python package QGIS requires
sudo -H pip3 install sip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.