Skip to main content

Posts

Showing posts with the label The connection to the server was lost. Attempting reset: Failed.

Fatal Python error: Py_Initialize: Unable to get the locale encoding

Hi , If you are getting the above ERROR message while configuring PL/PYTHON module, then please use the below steps to configure in PostgreSQL. We need to use PYTHON 3.2 Version due to some bugs in earlier version. Step 1 ===== Download Link: http://www.activestate.com/activepython/downloads/thank-you?dl=http://downloads.activestate.com/ActivePython/releases/3.2.2.3/ActivePython-3.2.2.3-linux-x86.tar.gz" Step 2 ===== -bash-4.1$ export PYTHONPATH=/opt/ActivePython-3.2/bin:$PATH -bash-4.1$ export PYTHONHOME=/opt/ActivePython-3.2/ -bash-4.1$ export LD_LIBRARY_PATH=/opt/ActivePython-3.2/lib/ Step 3 ===== -bash-4.1$ ./pg_ctl -D ../data/ stop -mf waiting for server to shut down.... done server stopped -bash-4.1$ ./pg_ctl -D ../data/ start server starting Step 4 ===== -bash-4.1$ ./psql -p 5434 postgres Password: psql.bin (9.1.4) Type "help" for help. postgres=# CREATE LANGUAGE plpython3u; CREATE LANGUAGE postgres=# Step 5 ===== postgres=...