Was that psycopg library built on the same system? Python3 mangles the name of the C modules, e.g. it would create something called "_psycopg.cpython-35m.so". Is it where it is expected? Which should be in /usr/lib64/python3.5/site-packages/psycopg2 in your case. Could it be that there is another _psycopg[.whatever].so somewhere else in the system, confusing the importer? I think (but I'm not sure) that the same error could happen because libpq is not found: does ldd -r on the .so return any undefined symbol about the libpq (not about python: these are normal).
On Fri, Sep 2, 2016 at 11:56 AM, Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,
While working on pgadmin4 packaging, I noticed the following. This is psycopg2 2.6.2 on Fedora 24 and Python 3:
File "/usr/lib64/python3.5/site-packages/psycopg2/__init__.py", line 50, in <module> from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: No module named 'psycopg2._psycopg'
I am not a Python guy, so I need some help in here. How can I fix this?
Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR