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.

asked Mar 30, 2015 at 14:20
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 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. 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\PostgreSQL9円.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.

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.