from qgis.core import QgsFeature, QgsGeometry. DLL load failed
Question: I recently installed QGIS and I want to import qgis module of Python. I use
Windows 7 x64 and QGIS 2.2 x64. I set the PATH to :

    
    
    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\mapnik-v2.2.0\lib;C:\mapnik-v2.2.0\bin;C:\Program Files (x86)\QGIS Valmiera\apps\qgis\python;C:\OSGeo4W\bin;E:\Python\GeoDjango\myplanet;E:\Python\GeoDjango\myplanet;C:\Program Files (x86)\QGIS Valmiera\bin;C:\Program Files (x86)\QGIS Valmiera\apps\msys\bin;C:\Program Files (x86)\QGIS Valmiera\apps\Python27;C:\Program Files (x86)\QGIS Valmiera\bin;C:\Program Files (x86)\QGIS Valmiera\apps\qgis\python\qgis;
    

and PYTHONPATH to:

    
    
    C:\mapnik-v2.2.0\python\2.7\site-packages;E:\Python\GeoDjango\myplanet;C:\Program Files\QGIS Valmiera\apps\qgis\python;C:\Program Files\QGIS Valmiera\apps\Python27\lib;C:\Program Files\QGIS Valmiera\apps\Python27\Lib\site-packages;C:\Program Files\QGIS Valmiera\apps\Python27\DLLs;
    

I still get this error:

    
    
        import qgis
      File "C:\Program Files\QGIS Valmiera\apps\qgis\python\qgis\__init__.py", line 35, in <module>
        from qgis.core import QgsFeature, QgsGeometry
    ImportError: DLL load failed: The specified module could not be found.
    

I used Dependency Walker to track the problems with the DLL load. this is the
screenshot of Dependency Walker: ![enter image description
here](http://i.stack.imgur.com/RO8o3.png)

    
    
    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: Modules with different CPU types were found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
    

How can I fix the errors?


Answer: See here: [DLL load failed with
PyQGIS](http://stackoverflow.com/questions/14334000/dll-load-failed-with-
pyqgis/25269980#25269980)

    
    
    import sys
    sys.path.extend([r"C:\Program Files\QGIS Valmiera\apps",r"C:\Program Files\QGIS Valmiera\apps\qgis\bin",r"C:\Program Files\QGIS Valmiera\apps\Python27"])
    
    import qgis.core
    

