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

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

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

Server+は、IT業界団体CompTIAが認定しているサーバー業務に関する資格です。サーバーのHW/SW構築・メンテナンス・仮想化など、サーバー運営上の運用・管理において幅広く対応できるスキルを評価します。

Flask

FlaskはPython用のマイクロフレームワークであり、Werkzeug・Jinja 2・good intentionsをベースにしています。

Heroku

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

Python

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

Q&A

0回答

779閲覧

Heroku サーバーにBuild できない

Na3430mls

総合スコア3

Server+

Server+は、IT業界団体CompTIAが認定しているサーバー業務に関する資格です。サーバーのHW/SW構築・メンテナンス・仮想化など、サーバー運営上の運用・管理において幅広く対応できるスキルを評価します。

Flask

FlaskはPython用のマイクロフレームワークであり、Werkzeug・Jinja 2・good intentionsをベースにしています。

Heroku

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

Python

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

0グッド

0クリップ

投稿2021/04/14 05:09

Python初心者です。ローカルで作ったファイルをHerokuのサーバーにdeployしようとしています。
git push heroku master をすると以下のようにエラーが出ました。
bruch は確認したところ、masterになっていました。
バージョンが違うのかもしれない。と思って、requirements.txtも念のため新しく書き換えましたがだめでした。

どうしたらpushをrejectされるエラーを解決できるのでしょうか。。。

git push heroku master Enumerating objects: 48, done. Counting objects: 100% (48/48), done. Delta compression using up to 8 threads Compressing objects: 100% (43/43), done. Writing objects: 100% (48/48), 604.91 KiB | 15.92 MiB/s, done Total 48 (delta 14), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: -----> Python app detected remote: -----> Installing python-3.9.4 remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2 remote: -----> Installing SQLite3 remote: -----> Installing requirements with pip remote: Collecting aiodns==2.0.0 remote: Downloading aiodns-2.0.0-py2.py3-none-any.whl (4.8 kB) remote: Collecting aiohttp==3.7.4.post0 remote: Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB) remote: Processing /home/ktietz/src/ci/alabaster_1611921544520/work remote: ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/ktietz/src/ci/alabaster_1611921544520/work' remote: remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 5b9d3a5d3e2d34a3a7457bbd4b88fbd7886cf11a remote: ! remote: ! We have detected that you have triggered a build from source code with version 5b9d3a5d3e2d34a3a7457bbd4b88fbd7886cf11a remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to pacific-tundra-19775. remote: To https://git.heroku.com/pacific-tundra-19775.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/pacific-tundra-19775.git'
herokuのログ -----> Building on the Heroku-20 stack -----> Determining which buildpack to use for this app -----> Python app detected -----> Installing python-3.9.4 -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2 -----> Installing SQLite3 -----> Installing requirements with pip Collecting aiodns==2.0.0 Downloading aiodns-2.0.0-py2.py3-none-any.whl (4.8 kB) Collecting aiohttp==3.7.4.post0 Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB) Processing /home/ktietz/src/ci/alabaster_1611921544520/work ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/ktietz/src/ci/alabaster_1611921544520/work' ! Push rejected, failed to compile Python app. ! Push failed コード ```

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

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

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

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

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

msiz07

2021/04/18 21:55

今から回答が付くかはわかりませんが、まずは「requirements.txt」の内容を追記した方が回答が付きやすくなると思います。 回答が付きやすくするには、回答者が問題を再現できるような情報を提示するのが大事です。少し長いかもしれませんが、以下のURLにある記事を参考にしてください。 https://www.chiark.greenend.org.uk/~sgtatham/bugs-jp.html
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問