1

I have built qgis source on windows 7. Libs have been downloaded from osgeow4 site. I even installed postgress as a standalone.

I am getting this error when the app launches..

File "C:/development/qgis2.9.0/./python/plugins\processing\algs\qgis\postgis_utils.py", line 28, in import psycopg2
File "C:/development/qgis2.9.0/./python\qgis\utils.py", line 483, in _import mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\development\OSGeo4W\apps\Python27\Lib\site-packages\psycopg2__init__.py", line 71, in from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
File "C:/development/qgis2.9.0/./python\qgis\utils.py", line 483, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: DLL load failed: The specified module could not be found.

I have check all my python paths etc, but am not sure what about the psycopg2 plugin is missing.

Any direction would be great.

2
  • 1
    psycopg2 lets you connect to the Postgres database. Open a python terminal and try to import psycopg2. If it throws an error you need to install it. You can download a windows install here: stickpeople.com/projects/python/win-psycopg
    – ustroetz
    Commented Mar 30, 2015 at 14:44
  • @ustroetz I don't get an error. I used the libs from OSGeo to get the base. I even installed postgres just now. It has not changed the error.
    – Omnia9
    Commented Mar 30, 2015 at 15:39

1 Answer 1

2

I don't have any guesses why the osgeo4w installer would leave you in this state. I would have guessed that it would install all the necessary DLLs.

But my experience with "The specified module cannot be found" is that it's nearly always one of two things:

  1. A problem with the PATH environment variable so that Python (or whatever) can't find your PostgreSQL client libraries (i.e. the stuff that lives in C:\Program Files\PostgreSQL\9.3\bin) or
  2. An architecture mismatch between Python and the PostgreSQL libraries (e.g. your Python is 32 bit and your PostgreSQL is 64 bit).

If you have the know-how, maybe you could check those things to see if there's a problem.

1
  • Thank you for this. I'm cleaning up my installs and will try this all again.
    – Omnia9
    Commented Mar 31, 2015 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.