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.

ncelik
  • 562
  • 2
  • 6
  • 16

1 Answers1

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.

Joseph
  • 75,746
  • 7
  • 171
  • 282
ncelik
  • 562
  • 2
  • 6
  • 16