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

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

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

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

Python

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

Q&A

解決済

1回答

1180閲覧

【Python】DjangoGirlsTutorial で $ git push heroku master が実行できない

y_y.

総合スコア16

Django

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

Python

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

0グッド

0クリップ

投稿2018/04/21 23:44

前提・実現したいこと

DjangoGirlsTutorial というサイトに従い、Django の学習を進めているものです。
「デプロイ」という項目で、$ git push heroku master を実行したところ、以下のエラーが発生しました。
お分かりになる方、ご教授願います。

https://djangogirlsjapan.gitbooks.io/workshop_tutorialjp/django_start_project/

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

Counting objects: 21, done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (21/21), 6.25 KiB | 2.08 MiB/s, done. Total 21 (delta 1), 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.5.0 (from -r /tmp/build_442f7fd0ab04703a3217b5036f9ca2b0/requirements.txt (line 1)) remote: Downloading https://files.pythonhosted.org/packages/d4/a6/4b8578c1848690d0c307c7c0596af2077536c9ef2a04d42b00fabaa7e49d/dj_database_url-0.5.0-py2.py3-none-any.whl remote: Collecting Django==1.8.19 (from -r /tmp/build_442f7fd0ab04703a3217b5036f9ca2b0/requirements.txt (line 2)) remote: Downloading https://files.pythonhosted.org/packages/96/b9/b4108da1275dc2ac1bba1e87739cb31b3d44339affb83b0e949fb09c2bef/Django-1.8.19-py2.py3-none-any.whl (6.2MB) remote: Collecting gunicorn==19.7.1 (from -r /tmp/build_442f7fd0ab04703a3217b5036f9ca2b0/requirements.txt (line 3)) remote: Downloading https://files.pythonhosted.org/packages/64/32/becbd4089a4c06f0f9f538a76e9fe0b19a08f010bcb47dcdbfbc640cdf7d/gunicorn-19.7.1-py2.py3-none-any.whl (111kB) remote: Collecting whitenoise==3.3.1 (from -r /tmp/build_442f7fd0ab04703a3217b5036f9ca2b0/requirements.txt (line 4)) remote: Downloading https://files.pythonhosted.org/packages/0c/58/0f309a821b9161d0e3a73336a187d1541c2127aff7fdf3bf7293f9979d1d/whitenoise-3.3.1-py2.py3-none-any.whl remote: Collecting psycopg2==2.5.4 (from -r /tmp/build_442f7fd0ab04703a3217b5036f9ca2b0/requirements.txt (line 5)) remote: Downloading https://files.pythonhosted.org/packages/63/c3/802668cb3cfc2880c2a8364623e7105a0257724a2612bb66ec733aaddb8c/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 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 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.3' remote: remote: ---------------------------------------- remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vrf2s3jv/psycopg2/ remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to djangogirlsblog-y. remote: To https://git.heroku.com/djangogirlsblog-yance.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/djangogirlsblog-y.git'

該当のソースコード

(myvenv) MacBook-Pro:djangogirls yy$ git push heroku master

試したこと

上記URLに従って写経していました。

(myvenv) MacBook-Pro:djangogirls yy$ pyenv install 3.6.4 python-build: use openssl from homebrew python-build: use readline from homebrew Downloading Python-3.6.4.tar.xz... -> https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz Installing Python-3.6.4... python-build: use readline from homebrew Installed Python-3.6.4 to /Users/yy/.pyenv/versions/3.6.4

python3.6.4にアップグレードしましたが同様のエラーが発生しました。

補足情報(FW/ツールのバージョンなど)

python 3.6.4
mac OS

宜しくお願い致します。

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

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

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

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

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

guest

回答1

0

ベストアンサー

きになったのですが

Error: could not determine PostgreSQL version from '10.3'

とあります。pip実行時にrequirementstxtファイルを参照して実行しているのですね?
そこで'10.3'と指定している?

バージョン番号はたとえば

10.3**.1**

のように指定します。記述ミスでは?

投稿2018/04/22 05:33

kawakawa2018

総合スコア1195

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

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

y_y.

2018/04/23 13:40

ご回答頂きありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問