Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
767 views
in Technique[技术] by (71.8m points)

git - Error: could not determine PostgreSQL version from '10.3' - Django on Heroku

I tried to push from local env to Heroku master. No new requirements from the previous commit. However, I received an Error which saying the system could not determine PostgreSQL version from "10.3".

Here is my requirements list:

amqp==1.4.9
anyjson==0.3.3
appdirs==1.4.3
awscli==1.11.89
billiard==3.3.0.23
boto==2.46.1
botocore==1.5.52
celery==3.1.25
Collectfast==0.5.2
colorama==0.3.7
dj-database-url==0.4.2
Django==1.11.1
django-celery==3.2.1
django-recaptcha==1.3.0
django-redis-cache==1.7.1
django-storages==1.5.2
django-storages-redux==1.3.2
docutils==0.13.1
gunicorn==19.7.0
honcho==0.5.0
jmespath==0.9.2
kombu==3.0.37
olefile==0.44
packaging==16.8
Pillow==4.3.0
psycopg2==2.6.2
pyasn1==0.2.3
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2018.3
PyYAML==3.12
redis==2.10.5
reportlab==3.4.0
rsa==3.4.2
s3transfer==0.1.10
selenium==3.4.0
six==1.10.0
vine==1.1.4
virtualenv==15.1.0
virtualenvwrapper-win==1.2.1
whitenoise==3.3.0

and below is the error in the build log.

Collecting amqp==1.4.9 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 1))
         Downloading amqp-1.4.9-py2.py3-none-any.whl (51kB)
       Collecting anyjson==0.3.3 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 2))
         Downloading anyjson-0.3.3.tar.gz
       Collecting appdirs==1.4.3 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 3))
         Downloading appdirs-1.4.3-py2.py3-none-any.whl
       Collecting awscli==1.11.89 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 4))
         Downloading awscli-1.11.89-py2.py3-none-any.whl (1.2MB)
       Collecting billiard==3.3.0.23 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 5))
         Downloading billiard-3.3.0.23.tar.gz (151kB)
       Collecting boto==2.46.1 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 6))
         Downloading boto-2.46.1-py2.py3-none-any.whl (1.4MB)
       Collecting botocore==1.5.52 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 7))
         Downloading botocore-1.5.52-py2.py3-none-any.whl (3.5MB)
       Collecting celery==3.1.25 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 8))
         Downloading celery-3.1.25-py2.py3-none-any.whl (526kB)
       Collecting Collectfast==0.5.2 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 9))
         Downloading Collectfast-0.5.2-py3-none-any.whl
       Collecting colorama==0.3.7 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 10))
         Downloading colorama-0.3.7-py2.py3-none-any.whl
       Collecting dj-database-url==0.4.2 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 11))
         Downloading dj_database_url-0.4.2-py2.py3-none-any.whl
       Collecting Django==1.11.1 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 12))
         Downloading Django-1.11.1-py2.py3-none-any.whl (6.9MB)
       Collecting django-celery==3.2.1 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 13))
         Downloading django-celery-3.2.1.tar.gz (91kB)
       Collecting django-recaptcha==1.3.0 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 14))
         Downloading django-recaptcha-1.3.0.tar.gz
       Collecting django-redis-cache==1.7.1 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 15))
         Downloading django-redis-cache-1.7.1.tar.gz
       Collecting django-storages==1.5.2 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 16))
         Downloading django_storages-1.5.2-py2.py3-none-any.whl (51kB)
       Collecting django-storages-redux==1.3.2 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 17))
         Downloading django_storages_redux-1.3.2-py2.py3-none-any.whl (41kB)
       Collecting docutils==0.13.1 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 18))
         Downloading docutils-0.13.1-py3-none-any.whl (536kB)
       Collecting gunicorn==19.7.0 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 19))
         Downloading gunicorn-19.7.0-py2.py3-none-any.whl (112kB)
       Collecting honcho==0.5.0 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 20))
         Downloading honcho-0.5.0.tar.gz
       Collecting jmespath==0.9.2 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 21))
         Downloading jmespath-0.9.2-py2.py3-none-any.whl
       Collecting kombu==3.0.37 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 22))
         Downloading kombu-3.0.37-py2.py3-none-any.whl (240kB)
       Collecting olefile==0.44 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 23))
         Downloading olefile-0.44.zip (74kB)
       Collecting packaging==16.8 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 24))
         Downloading packaging-16.8-py2.py3-none-any.whl
       Collecting Pillow==4.3.0 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 25))
         Downloading Pillow-4.3.0-cp35-cp35m-manylinux1_x86_64.whl (5.8MB)
       Collecting psycopg2==2.6.2 (from -r /tmp/build_28bcf3a327daae7657433628289c1501/requirements.txt (line 26))
         Downloading psycopg2-2.6.2.tar.gz (376kB)
           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 /tmp/pip-build-24iic71n/psycopg2/
 !     Push rejected, failed to compile Python app.
 !     Push failed

Has anyone ever get through this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The OP's comment is confirmed in psycopg/psycopg2 issue 594

pip install psycopg2 success and installed version 2.7.3.1.
But I want version 2.6.1

The problem was fixed in #489 released in psycopg 2.7. We don't have plans to backport the fix to 2.6.

Use a pg_config from a production version of Postgres not from 10 beta 4.

See PR 504


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...