Re: Python and Postgres error
"Ricardo J. Barberis via slackware" <[email protected]> Thu, 14 Sep 2017 13:37:06 -0300
| Newsgroups | gmane.linux.slackware |
|---|---|
| Organization | Donweb.com |
| Message-ID | <[email protected]> |
El Jueves 14/09/2017 a las 12:33, Thomas Altfather Good via slackware escribió: > Shot in the dark here - anyone seen this error / know of a fix? > > After running a query in a python script: > > ImportError: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so: > undefined symbol: PyUnicodeUCS4_DecodeUTF8 > > Everything looks to be in the right place: > > ldd /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so | grep libpq > libpq.so.5 => /usr/local/pgsql/lib/libpq.so.5 (0x00007f2866b05000) > > ls -l /usr/local/pgsql/lib/libpq.so.5 > lrwxrwxrwx 1 postgres users 12 Feb 6 2017 > /usr/local/pgsql/lib/libpq.so.5 -> libpq.so.5.9 > > thanks! I seem to remember Slackware's python being recompiled with a different unicode representation some time ago, this post sheds some light on the issue: https://stackoverflow.com/questions/16871799/trying-to-import-a-module-undefined-symbol-pyunicodeucs4-decodeutf8#16872055 Basically, you have to recompile your python modules against the new python. Cheers, -- Ricardo J. Barberis Usuario Linux Nº 250625: http://counter.li.org/ Usuario LFS Nº 5121: http://www.linuxfromscratch.org/ Senior SysAdmin / IT Architect - www.DonWeb.com -- slackware mailing list [email protected] https://mailman.lug.org.uk/mailman/listinfo/slackware