From 522af403c6bba0e9d071adbd13c37cfde06e9639 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 15 Feb 2011 12:50:37 +0000 Subject: [PATCH] Added FAQ entry about the PYTHON_EGG_CACHE problem --- doc/src/faq.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/src/faq.rst b/doc/src/faq.rst index 9172e351..52c82d28 100644 --- a/doc/src/faq.rst +++ b/doc/src/faq.rst @@ -107,6 +107,7 @@ Transferring binary data from PostgreSQL 9.0 doesn't work. .. __: http://www.postgresql.org/docs/9.0/static/datatype-binary.html .. __: http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-BYTEA-OUTPUT + Best practices -------------- @@ -138,8 +139,8 @@ What are the advantages or disadvantages of using named cursors? little memory on the client and to skip or discard parts of the result set. -Problems compiling Psycopg from source --------------------------------------- +Problems compiling and deploying psycopg2 +----------------------------------------- .. cssclass:: faq @@ -151,3 +152,14 @@ I can't compile `!psycopg2`: the compiler says *error: libpq-fe.h: No such file You need to install the development version of the libpq: the package is usually called ``libpq-dev``. +Psycopg raises *ImportError: cannot import name tz* on import in mod_wsgi / ASP, but it works fine otherwise. + If `!psycopg2` is installed in an egg_ (e.g. because installed by + :program:`easy_install`), the user running the program may be unable to + write in the `eggs cache`__. Set the env variable + :envvar:`PYTHON_EGG_CACHE` to a writable directory. With modwsgi you can + use the WSGIPythonEggs__ directive. + + .. _egg: http://peak.telecommunity.com/DevCenter/PythonEggs + .. __: http://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache + .. __: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonEggs +