2

I was trying to set up path to be able to call qgis modules as it defined in their website Introduction and set PYTHONPATH=c:\qgispath\python . I also try to follow suggestion in link below

How to import qgis.core to python IDLE?

However, I still get import error. I also get error ImportError: DLL load failed: The specified module could not be found.

The other error I get is

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    import qgis.core
  File "C:\Program Files\QGIS Wien\apps\qgis\python\qgis\__init__.py", line 26, in <module>
    import sip
ImportError: No module named sip

I want to be able to call this module from Spider or Python idle under arcgis. Does anyone know how to do that or have more detailed explained documentation? I can call the arcpy from spider but I could not achieve that for qgis.core module.

1

After I added Python Paths below:

'C:\Program Files\QGIS Wien\apps\Python27\sip'
'C:\Program Files\QGIS Wien\apps\qgis\python' 
'C:\Program Files\QGIS Wien\apps\Python27\Lib\site-packages'

The problem was solved in PyScripter, however in the Spider, the error is now changed to as below:

from qgis._core import *
ImportError: DLL load failed: The specified procedure could not be found.

I guess I will use PyScripter instead of Spider.

  • Download Dependency Walker and point it at C:\Program Files\QGIS Wien\apps\qgis\python\qgis\_core.pyd then post the results – raphael Jan 4 '17 at 22:40

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.