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

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

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

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

Heroku

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

Python

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

Q&A

解決済

2回答

478閲覧

【Dジャンゴ】【ヘロク】git push heroku masterがうまくいかない

donut4

総合スコア148

Django

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

Heroku

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

Python

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

0グッド

0クリップ

投稿2019/05/08 06:51

編集2019/05/14 01:03

前提・実現したいこと

djangoで作ったアプリをherokuで動かしたいが、git push heroku masterでうまくいかない。

http://makimakimakino.hatenablog.com/entry/2019/01/13/200729
のページの手順で進めている。(git push heroku masterまでの手順は難なく突破できている様子。)

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

C:\Users\USER\Desktop\django_app>git push heroku master
Enumerating objects: 43, done.
Counting objects: 100% (43/43), done.
Delta compression using up to 4 threads
Compressing objects: 100% (36/36), done.
Writing objects: 100% (43/43), 11.52 KiB | 147.00 KiB/s, done.
Total 43 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.6.8
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting alabaster==0.7.12 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 1))
remote: Downloading https://files.pythonhosted.org/packages/10/ad/00b090d23a222943eb0eda509720a404f531a439e803f6538f35136cae9e/alabaster-0.7.12-py2.py3-none-any.whl
remote: Collecting asn1crypto==0.24.0 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 2))
remote: Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
remote: Collecting astroid==2.2.5 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 3))
remote: Downloading https://files.pythonhosted.org/packages/d5/ad/7221a62a2dbce5c3b8c57fd18e1052c7331adc19b3f27f1561aa6e620db2/astroid-2.2.5-py3-none-any.whl (193kB)
remote: Collecting attrs==19.1.0 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 4))
remote: Downloading https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
remote: Collecting Babel==2.6.0 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 5))
remote: Downloading https://files.pythonhosted.org/packages/b8/ad/c6f60602d3ee3d92fbed87675b6fb6a6f9a38c223343ababdb44ba201f10/Babel-2.6.0-py2.py3-none-any.whl (8.1MB)
remote: Collecting backcall==0.1.0 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 6))
remote: Downloading https://files.pythonhosted.org/packages/84/71/c8ca4f5bb1e08401b916c68003acf0a0655df935d74d93bf3f3364b310e0/backcall-0.1.0.tar.gz
remote: Collecting bleach==3.1.0 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 7))
remote: Downloading https://files.pythonhosted.org/packages/ab/05/27e1466475e816d3001efb6e0a85a819be17411420494a1e602c36f8299d/bleach-3.1.0-py2.py3-none-any.whl (157kB)
remote: Collecting certifi==2019.3.9 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 8))
remote: Downloading https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl (158kB)
remote: Collecting cffi==1.12.2 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 9))
remote: Downloading https://files.pythonhosted.org/packages/20/f7/87b62a8895bf7c93e907b05b97bc4459c81a38a61151f03a6eae13d863aa/cffi-1.12.2-cp36-cp36m-manylinux1_x86_64.whl (428kB)
remote: Collecting chardet==3.0.4 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 10))
remote: Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)




remote: Collecting python-dateutil==2.8.0 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 57))
remote: Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
remote: Collecting pytz==2019.1 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 58))
remote: Downloading https://files.pythonhosted.org/packages/3d/73/fe30c2daaaa0713420d0382b16fbb761409f532c56bdcc514bf7b6262bb6/pytz-2019.1-py2.py3-none-any.whl (510kB)
remote: Collecting pywin32==223 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 59))
remote: Could not find a version that satisfies the requirement pywin32==223 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 59)) (from versions: )
remote: No matching distribution found for pywin32==223 (from -r /tmp/build_cdbc7aaed2eaa7c2cada08f2f6901fe1/requirements.txt (line 59))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to hoge.
remote:
To https://git.heroku.com/hoge.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/hoge.git'

該当のソースコード

git push heroku master

試したこと

私と似たような質問の回答で「psycopg2のバージョンを上げてrequirements.txtを編集する」旨の方法を
試してみましたが既に最新のバージョンのようでした。

Requirement already satisfied: psycopg2 in d:\anaconda3\envs\myspace\lib\site-packages (2.8.2)
と出たので。

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

一応heroku createまではできている様子です。

C:\Users\USER\Desktop\django_app>heroku create hoge
Creating ⬢ hoge... done
https://hoge.herokuapp.com/ | https://git.heroku.com/hoge.git

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

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

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

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

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

guest

回答2

0

この質問と同じ状況ではないかと思います。
https://teratail.com/questions/147328

投稿2019/05/08 09:51

iwamot

総合スコア1154

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

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

donut4

2019/05/09 03:53

ありがとうございます。 いろいろ辿ってみた結果、pywin32をアンインストールして pip freeze > requirements.txtを書き直してpushしなおしたら上手くいきました。
guest

0

自己解決

エラーコードをより深く調べてみました。

git push heroku masterした時にpywin32が上手く読み込まれないみたいなのでパッケージをアンインストールしてrequirements.txtを更新して再コミットしたら解決し無事アプリをデプロイできました。

投稿2019/05/09 04:08

編集2019/05/14 01:04
donut4

総合スコア148

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問