Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing psycopg2==2.6.2

I have problems when I try installing psycopg2==2.6.2. I have installed postgresql 9.6. and I am using a virtualenv. Any help is welcome.

Collecting psycopg2==2.6.2 (from -r requirements.txt (line 21))
  Downloading psycopg2-2.6.2.tar.gz (376kB)
    100% |████████████████████████████████| 378kB 281kB/s 
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    Error: could not determine PostgreSQL version from '10.0'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-k7nulk7r/psycopg2/
like image 420
robto09 Avatar asked Oct 31 '17 21:10

robto09


People also ask

What is psycopg2 module in Python?

Psycopg is a PostgreSQL adapter for the Python programming language. It is a wrapper for the libpq , the official PostgreSQL client library. The psycopg2 package is the current mature implementation of the adapter: it is a C extension and as such it is only compatible with CPython .


1 Answers

This is a bug in psycopg2 2.6. The bug was fixed in psycopg2 2.7. Install the latest version to work with PostgreSQL 10.

like image 145
phd Avatar answered Nov 14 '22 14:11

phd