Why I can not make python3.1 working with posgresql 9.0
<p>I'm trying to use py-postgresql, since it is only API I found which suppose to work with python3. Any suggestions or help is most welcome. Below is the error popping up:</p>

<pre><code>&gt;&gt;&gt; import postgresql.driver
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "postgresql/driver/__init__.py", line 9, in &lt;module&gt;
    from .pq3 import Driver
  File "postgresql/driver/pq3.py", line 32, in &lt;module&gt;
    from ..python.socket import SocketFactory
  File "postgresql/python/socket.py", line 10, in &lt;module&gt;
    import ssl
  File "/usr/local/lib/python3.1/ssl.py", line 59, in &lt;module&gt;
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named _ssl

user@yadayada:~$ python3.1
Python 3.1.2 (r312:79147, Sep 20 2010, 16:47:17) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; help("modules")

Please wait a moment while I gather a list of all available modules...

CDROM               bisect              io                  shelve
DLFCN               build_class         itertools           shlex
IN                  builtins            json                shutil
TYPES               cProfile            keyword             signal
__future__          calendar            lib2to3             site
_abcoll             cgi                 linecache           smtpd
_ast                cgitb               locale              smtplib
_bisect             chunk               logging             sndhdr
_codecs             cmath               macpath             socket
_codecs_cn          cmd                 macurl2path         socketserver
_codecs_hk          code                mailbox             spwd
_codecs_iso2022     codecs              mailcap             sqlite3
_codecs_jp          codeop              marshal             sre_compile
_codecs_kr          collections         math                sre_constants
_codecs_tw          colorsys            mimetypes           sre_parse
_collections        compileall          mmap                ssl
_compat_pickle      configparser        modulefinder        stat
_csv                contextlib          multiprocessing     string
_ctypes             copy                netrc               stringprep
_ctypes_test        copyreg             nis                 struct
_dummy_thread       crypt               nntplib             subprocess
_elementtree        csv                 ntpath              sunau
_functools          ctypes              nturl2path          symbol
_heapq              curses              numbers             symtable
_io                 datetime            opcode              sys
_json               dbm                 operator            syslog
_locale             decimal             optparse            tabnanny
_lsprof             difflib             os                  tarfile
_markupbase         dis                 os2emxpath          telnetlib
_md5                distutils           ossaudiodev         tempfile
_multibytecodec     doctest             parser              termios
_multiprocessing    dummy_threading     pdb                 test
_pickle             email               pickle              textwrap
_pyio               encodings           pickletools         this
_random             errno               pipes               threading
_sha1               fcntl               pkgutil             time
_sha256             filecmp             platform            timeit
_sha512             fileinput           plistlib            tkinter
_socket             fnmatch             poplib              token
_sre                formatter           posix               tokenize
_strptime           fractions           posixpath           trace
_struct             ftplib              postgresql          traceback
_symtable           functools           pprint              tty
_testcapi           gc                  profile             turtle
_thread             genericpath         pstats              types
_threading_local    getopt              pty                 unicodedata
_warnings           getpass             pwd                 unittest
_weakref            gettext             py_compile          urllib
_weakrefset         glob                pyclbr              uu
abc                 grp                 pydoc               uuid
aifc                gzip                pydoc_data          warnings
antigravity         hashlib             pyexpat             wave
array               heapq               queue               weakref
ast                 hmac                quopri              webbrowser
asynchat            html                random              wsgiref
asyncore            http                re                  xdrlib
atexit              idlelib             reprlib             xml
audioop             imaplib             resource            xmlrpc
base64              imghdr              rlcompleter         xxsubtype
bdb                 imp                 runpy               zipfile
binascii            importlib           sched               zipimport
binhex              inspect             select              

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

&gt;&gt;&gt; import ssl
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/usr/local/lib/python3.1/ssl.py", line 59, in &lt;module&gt;
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named _ssl
&gt;&gt;&gt; import tkinter
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/usr/local/lib/python3.1/tkinter/__init__.py", line 39, in &lt;module&gt;
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
&gt;&gt;&gt; import _ctypes
&gt;&gt;&gt; 
</code></pre>
