Comment 4 for bug 811115

Revision history for this message
Daniele Varrazzo (daniele-varrazzo) wrote :

Hello, I am one of the current psycopg maintainers.

This problem was addressed in release 2.4.2. In previous releases, if the mx include files were found (by setup.py) the mx support was compiled and mx.DateTime was unconditionally imported at psycopg2 import time. This creates the error reported here (and in http://psycopg.lighthouseapp.com/projects/62710/tickets/53) if the module is not actually available. The error has been reported only recently (probably trigger by the use of virtualenv with "pure environments").

The issue was fixed in psycopg 2.4.2, where the import is no more unconditional even if the mx support is built at compile time. I suggest to upgrade the package to the most recent version.