Help us understand the problem. What is going on with this article?

Djangoでherokuを使おうとした時, git push heroku master ができなかった話

More than 1 year has passed since last update.


git push heroku master


Counting objects: 31, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (26/26), done.
Writing objects: 100% (31/31), 5.57 KiB | 1.85 MiB/s, done.
Total 31 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: -----> Python app detected
remote: -----> Installing python-3.6.5
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        Collecting dj-database-url==0.5.0 (from -r /tmp/build_974b1a0774884d140e71026c0a3f1b43/requirements.txt (line 1))
remote:          Downloading
remote:        Collecting Django==1.11 (from -r /tmp/build_974b1a0774884d140e71026c0a3f1b43/requirements.txt (line 2))
remote:          Downloading (6.9MB)
remote:        Collecting gunicorn==19.8.1 (from -r /tmp/build_974b1a0774884d140e71026c0a3f1b43/requirements.txt (line 3))
remote:          Downloading (112kB)
remote:        Collecting pytz==2018.4 (from -r /tmp/build_974b1a0774884d140e71026c0a3f1b43/requirements.txt (line 4))
remote:          Downloading (510kB)
remote:        Collecting whitenoise==3.3.1 (from -r /tmp/build_974b1a0774884d140e71026c0a3f1b43/requirements.txt (line 5))
remote:          Downloading
remote:        Collecting psycopg2==2.5.4 (from -r /tmp/build_974b1a0774884d140e71026c0a3f1b43/requirements.txt (line 6))
remote:          Downloading (682kB)
remote:            Complete output from command python egg_info:
remote:            running egg_info
remote:            creating pip-egg-info/psycopg2.egg-info
remote:            writing pip-egg-info/psycopg2.egg-info/PKG-INFO
remote:            writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
remote:            writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
remote:            writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
remote:            Error: could not determine PostgreSQL version from '10.4'
remote:            ----------------------------------------
remote:        Command "python egg_info" failed with error code 1 in /tmp/pip-build-e7m3xfsy/psycopg2/
remote:  !     Push rejected, failed to compile Python app.
remote:  !     Push failed
remote: Verifying deploy...
remote: !   Push rejected to (アプリ名).
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'アプリ名).git'


remote: Command "python egg_info" failed with error code 1 in /tmp/pip-build-e7m3xfsy/psycopg2/

psycopg2内に書かれたpython egg_infoというコマンドが実行できないというお話.


pip install --upgrade psycopg2


pip freeze


git add -A
git commit -m "update psycopg2"
git push heroku master



Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away