質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.49%
Django

DjangoはPythonで書かれた、オープンソースウェブアプリケーションのフレームワークです。複雑なデータベースを扱うウェブサイトを開発する際に必要な労力を減らす為にデザインされました。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

3094閲覧

Python DjangoアプリをHerokuへデプロイできません

jonasan

総合スコア6

Django

DjangoはPythonで書かれた、オープンソースウェブアプリケーションのフレームワークです。複雑なデータベースを扱うウェブサイトを開発する際に必要な労力を減らす為にデザインされました。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2018/02/18 15:19

編集2018/02/18 15:23

前提・実現したいこと

はじめまして。
Djangoのチュートリアルに従ってアプリをHerokuへデプロイしようとしたのですが、
躓いてしまったので質問させて頂きます。

操作環境はmacOS Sierra 10.12.4です

requirements.txtは以下の通りです。

dj-database-url==0.4.2
dj-static==0.0.6
Django==1.11
django-toolbelt==0.0.1
gunicorn==19.7.1
psycopg2==2.7.4
pytz==2018.3
static3==0.7.0
whitenoise==3.3.1

またruntime.txtは
python-3.6.1
としております。(現在は3.6.4)

Procfileは
web: gunicorn mysite.wsgi
としております。

発生している問題・エラーメッセージ

$ git push heroku master
Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (20/20), 4.49 KiB | 0 bytes/s, done.
Total 20 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.4 (you are using python-3.5.2, which is unsupported).
remote: ! We recommend upgrading by specifying the latest version (python-3.6.4).
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.5.2
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting dj-database-url==0.4.2 (from -r /tmp/build_f00c4f6111265672b69a2abbe2dde18d/requirements.txt (line 1))
remote: Downloading dj_database_url-0.4.2-py2.py3-none-any.whl
remote: Collecting Django==1.11 (from -r /tmp/build_f00c4f6111265672b69a2abbe2dde18d/requirements.txt (line 2))
remote: Downloading Django-1.11-py2.py3-none-any.whl (6.9MB)
remote: Collecting gunicorn==19.7.1 (from -r /tmp/build_f00c4f6111265672b69a2abbe2dde18d/requirements.txt (line 3))
remote: Downloading gunicorn-19.7.1-py2.py3-none-any.whl (111kB)
remote: Collecting pytz==2018.3 (from -r /tmp/build_f00c4f6111265672b69a2abbe2dde18d/requirements.txt (line 4))
remote: Downloading pytz-2018.3-py2.py3-none-any.whl (509kB)
remote: Collecting whitenoise==3.3.1 (from -r /tmp/build_f00c4f6111265672b69a2abbe2dde18d/requirements.txt (line 5))
remote: Downloading whitenoise-3.3.1-py2.py3-none-any.whl
remote: Collecting psycopg2==2.5.4 (from -r /tmp/build_f00c4f6111265672b69a2abbe2dde18d/requirements.txt (line 6))
remote: Downloading psycopg2-2.5.4.tar.gz (682kB)
remote: Complete output from command python setup.py egg_info:
remote: running egg_info
remote: creating pip-egg-info/psycopg2.egg-info
remote: writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
remote: writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
remote: writing pip-egg-info/psycopg2.egg-info/PKG-INFO
remote: writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
remote: Error: could not determine PostgreSQL version from '10.1'
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dy0b92ka/psycopg2/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to jonasan-djangoblog.
remote:
To https://git.heroku.com/jonasan-djangoblog.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/jonasan-djangoblog.git'

PostgreSQLというものに何か問題があるということなのでしょうか?

どなたかご意見、ご指導賜れれば幸いでございます。

何卒よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

Herokuの方のチュートリアルを見てやったらデプロイできました。

投稿2018/02/20 08:22

jonasan

総合スコア6

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

TakeshiNakahara

2018/02/22 03:59

全く同じエラーで困っています。どこを参照されましたでしょうか?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.49%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問