Re: 2.6.2 import error

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: 2.6.2 import error
Date: 2016-09-02 11:13:47
Message-ID: CA+mi_8Z2s68dywSr_g0M_9Hz0EKFqAQZNGhG1uv5rm2_88qbpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

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(at)gunduz(dot)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
>

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Devrim Gündüz 2016-09-02 14:47:49 Re: 2.6.2 import error
Previous Message Devrim Gündüz 2016-09-02 10:56:58 2.6.2 import error