Re: Import error using psycopg2 with py2exe
Tim Roberts <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | Providenza & Boekelheide, Inc. |
| Message-ID | <[email protected]> |
Mike Burke wrote: > Python 2.6.2 > Psycopg2.0.10 (also used 2.0.9) > Py2Exe 0.6.9 > OS: Vista Business > > I made a simple one line script that contains only a single import > line for psycopg2. The script runs fine under straight python and > after convert to exe on my development maching, however after the > files are copied to some other machine I get the following error: > > Traceback (most recent call last): > File "test1.py", line 2, in <module> > File "psycopg2\__init__.pyc", line 60, in <module> > File "psycopg2\_psycopg.pyc", line 12, in <module> > File "psycopg2\_psycopg.pyc", line 10, in __load > ImportError: DLL load failed: The specified procedure could not be found. > > There was somebody that posted the same problem on the list a long > time ago and he never received any answer. > > Does anybody know a solution or where I should start to look to > isolate the error When py2exe was searching for DLLs and modules, did it include libpq.dll? You need that. If it didn't find it, you might need to add it to your setup script. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc.