[Psycopg] Getting psycopg2 to work in cygwin on Windows Vista

Farhan Ahmad farhan at thebitguru.com
Sun Jul 13 21:06:21 CEST 2008


Hi,
 I am trying to get psycopg2 to work on Windows Vista through cygwin.
 Everything compiles fine, but when I import it python says that it
can't findany module by that name.  I have attached the output from a
"python -v" session.  Does anyone have any ideas why the system cannot
find the _psycopg?  Everything compiled and installed without any
issues.
 Thank you!
 Farhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.initd.org/pipermail/psycopg/attachments/20080713/68f3af90/attachment.htm>
-------------- next part --------------
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.5/site.pyc matches /usr/lib/python2.5/site.py
import site # precompiled from /usr/lib/python2.5/site.pyc
# /usr/lib/python2.5/os.pyc matches /usr/lib/python2.5/os.py
import os # precompiled from /usr/lib/python2.5/os.pyc
import posix # builtin
# /usr/lib/python2.5/posixpath.pyc matches /usr/lib/python2.5/posixpath.py
import posixpath # precompiled from /usr/lib/python2.5/posixpath.pyc
# /usr/lib/python2.5/stat.pyc matches /usr/lib/python2.5/stat.py
import stat # precompiled from /usr/lib/python2.5/stat.pyc
# /usr/lib/python2.5/UserDict.pyc matches /usr/lib/python2.5/UserDict.py
import UserDict # precompiled from /usr/lib/python2.5/UserDict.pyc
# /usr/lib/python2.5/copy_reg.pyc matches /usr/lib/python2.5/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.5/copy_reg.pyc
# /usr/lib/python2.5/types.pyc matches /usr/lib/python2.5/types.py
import types # precompiled from /usr/lib/python2.5/types.pyc
import _types # builtin
# zipimport: found 78 names in /usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg
# /usr/lib/python2.5/warnings.pyc matches /usr/lib/python2.5/warnings.py
import warnings # precompiled from /usr/lib/python2.5/warnings.pyc
# /usr/lib/python2.5/linecache.pyc matches /usr/lib/python2.5/linecache.py
import linecache # precompiled from /usr/lib/python2.5/linecache.pyc
import encodings # directory /usr/lib/python2.5/encodings
# /usr/lib/python2.5/encodings/__init__.pyc matches /usr/lib/python2.5/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.5/encodings/__init__.pyc
# /usr/lib/python2.5/codecs.pyc matches /usr/lib/python2.5/codecs.py
import codecs # precompiled from /usr/lib/python2.5/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.5/encodings/aliases.pyc matches /usr/lib/python2.5/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.5/encodings/aliases.pyc
# /usr/lib/python2.5/encodings/ascii.pyc matches /usr/lib/python2.5/encodings/ascii.py
import encodings.ascii # precompiled from /usr/lib/python2.5/encodings/ascii.pyc
Python 2.5.1 (r251:54863, May 18 2007, 16:56:43) 
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
import psycopg2 # directory /usr/lib/python2.5/site-packages/psycopg2
# /usr/lib/python2.5/site-packages/psycopg2/__init__.pyc matches /usr/lib/python2.5/site-packages/psycopg2/__init__.py
import psycopg2 # precompiled from /usr/lib/python2.5/site-packages/psycopg2/__init__.pyc
dlopen("/usr/lib/python2.5/lib-dynload/datetime.dll", 2);
import datetime # dynamically loaded from /usr/lib/python2.5/lib-dynload/datetime.dll
# /usr/lib/python2.5/decimal.pyc matches /usr/lib/python2.5/decimal.py
import decimal # precompiled from /usr/lib/python2.5/decimal.pyc
# /usr/lib/python2.5/copy.pyc matches /usr/lib/python2.5/copy.py
import copy # precompiled from /usr/lib/python2.5/copy.pyc
# /usr/lib/python2.5/threading.pyc matches /usr/lib/python2.5/threading.py
import threading # precompiled from /usr/lib/python2.5/threading.pyc
import thread # builtin
dlopen("/usr/lib/python2.5/lib-dynload/time.dll", 2);
import time # dynamically loaded from /usr/lib/python2.5/lib-dynload/time.dll
# /usr/lib/python2.5/traceback.pyc matches /usr/lib/python2.5/traceback.py
import traceback # precompiled from /usr/lib/python2.5/traceback.pyc
dlopen("/usr/lib/python2.5/lib-dynload/collections.dll", 2);
import collections # dynamically loaded from /usr/lib/python2.5/lib-dynload/collections.dll
# /usr/lib/python2.5/re.pyc matches /usr/lib/python2.5/re.py
import re # precompiled from /usr/lib/python2.5/re.pyc
# /usr/lib/python2.5/sre_compile.pyc matches /usr/lib/python2.5/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.5/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.5/sre_constants.pyc matches /usr/lib/python2.5/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.5/sre_constants.pyc
# /usr/lib/python2.5/sre_parse.pyc matches /usr/lib/python2.5/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.5/sre_parse.pyc
# /usr/lib/python2.5/site-packages/psycopg2/tz.pyc matches /usr/lib/python2.5/site-packages/psycopg2/tz.py
import psycopg2.tz # precompiled from /usr/lib/python2.5/site-packages/psycopg2/tz.pyc
dlopen("/usr/lib/python2.5/site-packages/psycopg2/_psycopg.dll", 2);
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/psycopg2/__init__.py", line 60, in <module>
    from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: No such file or directory
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] psycopg2.tz
# cleanup[1] site
# cleanup[1] datetime
# cleanup[1] encodings
# cleanup[1] sre_constants
# cleanup[1] threading
# cleanup[1] re
# cleanup[1] collections
# cleanup[1] _codecs
# cleanup[1] zipimport
# cleanup[1] warnings
# cleanup[1] encodings.ascii
# cleanup[1] codecs
# cleanup[1] _types
# cleanup[1] thread
# cleanup[1] signal
# cleanup[1] traceback
# cleanup[1] linecache
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] time
# cleanup[1] exceptions
# cleanup[1] sre_parse
# cleanup[1] decimal
# cleanup[1] sre_compile
# cleanup[1] _sre
# cleanup[1] copy
# cleanup[1] types
# cleanup[2] copy_reg
# cleanup[2] posixpath
# cleanup[2] os.path
# cleanup[2] stat
# cleanup[2] UserDict
# cleanup[2] os
# cleanup sys
# cleanup __builtin__
# cleanup ints: 484 unfreed ints in 10 out of 10 blocks
# cleanup floats: 3 unfreed floats in 1 out of 1 block


More information about the Psycopg mailing list