Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am having problems with Python Shell importing the module "qgis.core". When I type "import qgis.core" the Shell ("idle.pyw") gives me this error:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import qgis.core
ImportError: DLL load failed: Impossibile trovare il modulo specificato (Trad "Impossible to find the specified module").

I have already set the environment to point the right folders following "PyQGIS cookbook" instructions. In my case, the paths are:

PYTHOPATH=C:\"QGIS_path"\apps\qgis\python;
Path=C:\"QGIS_path"\apps\qgis\bin.

Am I missing something? What are supposed to be the right libraries the Shell is unable to find?

I am working with windows 7 64 bit, QGIS Lisboa (version 1.8), Python 2.7.2 (the one that is included in the QGIS package).

share|improve this question
    
Are you working in C:\OSGeo4W or C:\Programs (x86)\Quantum GIS Lisboa\? You might get trouble with the blanks in the second variant. –  Andre Joost Jan 15 '13 at 10:19
    
I am working directly in C (namely, the path is "C:\Quantum_GIS_Lisboa", thus I've also deleted the blank parts of the path by inserting the underscores). For clarification, my full PYTHONPATH is "C:\Quantum_GIS_Lisboa\apps\qgis\python" while the Path is "C:\Quantum_GIS_Lisboa\apps\qgis\bin". Hope to find out a solution, it's been a long time since I'm trying to find one!... –  user9518 Jan 15 '13 at 10:31
    
qgis.bat adds C:\<qgispath>\apps\Python27\Scripts to my path. Maybe that one is missing for you. –  Andre Joost Jan 15 '13 at 10:40
    
Still getting the same error... However, even if I did change the environment by adding the path to "Python27/Scripts", it seems the system couldn't read it properly. If I print the "sys.path", it won't give the variable just added (next comment to see the print). –  user9518 Jan 15 '13 at 11:06
    
C:\\Quantum_GIS_Lisboa\\apps\\Python27\\Lib\\idlelib', 'C:\\Quantum_GIS_Lisboa\\apps\\qgis\\python', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\ArcGIS10.1\\DLLs', 'C:\\Python27\\ArcGIS10.1\\lib', 'C:\\Python27\\ArcGIS10.1\\lib\\plat-win', 'C:\\Python27\\ArcGIS10.1\\lib\\lib-tk', 'C:\\Python27\\ArcGIS10.1', –  user9518 Jan 15 '13 at 11:10
show 7 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.