Sunday 27 March 2016

Couldn't load SIP module (QGIS doesn't load Python)


I recently installed QGIS 2.4, but Python does not load. I am running on a Windows 64 bit machine.


I receive the error message "Couldn't load SIP module Python support will be disabled".


Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: %1 is not a valid Win32 application.



I have another installation of Python at C:/Python27. It is the 32-bit version.


When I remove C:/Python27 folder, QGIS works fine, so there is some linkage between the new QGIS installation and the C:/Python27 python interpreter. I can't permanently delete C:/Python because I need it for other applications, so I am wondering if there are any suggestion as to how to fix this.



Answer



In a command window, type set > set.txt to get a list of all environment variables you have set. Your python installation may have set some values that QGIS does not like.


The PATH variable is save, because qgis.bat sets its own path variable, but PYTHONPATH or something else may be harmful.


Once you found a link to C:\Python27, go to the system properties and change the environment variable (not sure how the commands are in your language version).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...