I've just upgraded to Fedora 27, and have been unable to get psycopg2 working.
I'd very much appreciate any help anyone can provide.
As a simple test case, I've been executing>>> import psycopg2
at the interactive shell. This works fine for Python 2.7, but fails for Python 3.x.
With Python 3.4 and 3.5, I get the message:
Traceback (most recent call last): File "", line 1, in ImportError: No module named 'psycopg2'
With Python 3.6, I see:
Traceback (most recent call last): File "", line 1, in File "/home/jazcap53/.local/lib/python3.6/site-packages/psycopg2/init.py", line 50, in from psycopg2._psycopg import ( # noqa ImportError: /home/jazcap53/.local/lib/python3.6/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so: symbol __res_maybe_init, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
I installed Fedora 27 from DVD-ROM. I find psycopg2 packages located at
/usr/lib64/python2.7/site-packages
and/home/jazcap53/.local/lib/python3.6/site-packages
My Python packages were all either included with Fedora, or installed via dnf
. They are:
python3-3.6.3-2.fc27.x86_64
python35-3.5.4-1.fc27.x86_64
python34-3.4.7-1.fc27.x86_64
python2-2.7.14-2.fc27.x86_64
Some packages I have installed that may be relevant are:
python2-devel-2.7.14-2.fc27.x86_64
python3-devel-3.6.3-2.fc27.x86_64
libpqxx-1:5.0.1-2.f27.x86_64
libpqxx-devel-1:5.0.1-2.f27.x86_64
libgcc-7.2.1-2.fc27.x86_64
postgresql-devel-9.6.6-1.fc27.x86_64
P.S.: If I'm asking this question in the wrong place, please direct me to the right place.
Edit: I noticed that:
/usr/lib64/python2.7/site-packages/
contains subdirectoriespsycopg2
andpsycopg2-2.7.3-py2.7.egg-info
but
/usr/lib64/python3.4/site-packages/
and/usr/lib64/python3.5/site-packages/
contain nothing related to psycopg2
and
/usr/lib64/python3.6/site-packages/
contains subdirectorypsycopg2-2.7.3-py3.6.egg-info
but not psycopg2
itself
pip3 install psycopg2
orpip install psycopg2
? – Nandu Kalidindipip install psycopg2
gives me: Requirement already satisfied: psycopg2 in /usr/lib64/python2.7/site-packagespip3 install psycopg2
gives me: Requirement already satisfied: psycopg2 in /home/jazcap53/.local/lib/python3.6/site-packages – jazcap53