ourresearch / citeas-api

Get the scholarly citation for any research product: software, preprint, paper, or dataset
https://citeas.org
MIT License
68 stars 4 forks source link

Postgres error when installing dependencies via pip #31

Closed martintoreilly closed 5 years ago

martintoreilly commented 6 years ago

Steps to reproduce

Hardware / OS: 15-inch Macbook Pro (2015) running macOS High Sierra (version 10.13.3 (17D102)

  1. Clone citeas-api at commit f2b293b9cb47bb4c079528d8a95837b3db77be97
  2. Create a virtual environment using virtualenv with the built-in macOS Python 2.7.10 (also replicated when setting up the virtual environment using a separately installed Python 3.6.4)
  3. Activate the virtual environment
  4. Try and install dependencies using pip install -r requirements.txt
Collecting psycopg2==2.6.1 (from -r requirements.txt (line 15))
  Using cached https://files.pythonhosted.org/packages/86/fd/cc8315be63a41fe000cce20482a917e874cdc1151e62cb0141f5e55f711e/psycopg2-2.6.1.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-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 manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    Error: could not determine PostgreSQL version from '10.3'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/kj/13ksgycx1lqcynzpcsl1btm00000gp/T/pip-install-jsrXgm/psycopg2/

Proposed solution

Update Postgres requirement in requirements.txt from psycopg2==2.6.1 to psycopg2==2.7. See issue on psycopg2 Githuib repo (via this Stackoverflow post).

caseydm commented 5 years ago

Hi Martin. I noticed the same error a bit ago. The codebase is now updated to psycopg2 2.7.5 which resolved it on my end.