herokuを使ってPythonアプリをHerokuにデプロイしようとしています。
git push時にerror: failed to push some refs toとエラーがでます。
名前→ユーザーで表記
(env) C:\Users\ユーザー\djangogirls\instant-django-master>heroku login
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/cli/browser/d6179a75-edbe-4bd1-aca7-d5fd34568ef2?requestor=SFMyNTY.g3QAAAACZAAEZGF0YW0AAAANMTQuMTIuMTMwLjIyNGQABnNpZ25lZG4GAFSjKrJ1AQ.FO4n3LUyHdT2aBwqjMBZMXaQTp4HQ01LeAc7Fh9sH4s
Logging in... done
Logged in as メールアドレス
(env) C:\Users\ユーザー\djangogirls\instant-django-master>heroku create
Creating app... done, ⬢ lit-springs-88054
https://lit-springs-88054.herokuapp.com/ | https://git.heroku.com/lit-springs-88054.git
(env) C:\Users\ユーザー\djangogirls\instant-django-master>git init
Reinitialized existing Git repository in C:/Users/test/djangogirls/instant-django-master/.git/
(env) C:\Users\ユーザー\djangogirls\instant-django-master>heroku git:remote -a medipolis-keika
set git remote heroku to https://git.heroku.com/medipolis-keika.git
(env) C:\Users\ユーザー\djangogirls\instant-django-master>git add .git push heroku master
fatal: pathspec 'push' did not match any files
(env) C:\Users\ユーザー\djangogirls\instant-django-master>git push heroku master
Enumerating objects: 55, done.
Counting objects: 100% (55/55), done.
Delta compression using up to 4 threads
Compressing objects: 100% (45/45), done.
Writing objects: 100% (55/55), 20.67 KiB | 460.00 KiB/s, done.
Total 55 (delta 6), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.9.0
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
・・・・
・・・・
・・・・
remote: ----------------------------------------
remote: ERROR: Failed building wheel for pyodbc
remote: Running setup.py clean for pyodbc
remote: Successfully built docopt psycopg2
remote: Failed to build pyodbc
remote: Installing collected packages: asgiref, certifi, chardet, dj-database-url, pytz, Django, django-crispy-forms, django-filter, whitenoise, psycopg2, django-heroku, pyodbc, django-pyodbc-azure, docopt, gunicorn, idna, urllib3, requests, yarg, pipreqs, sqlparse
remote: Running setup.py install for pyodbc: started
remote: Running setup.py install for pyodbc: finished with status 'error'
remote: ERROR: Command errored out with exit status 1:
remote: command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vo7fz92g/pyodbc/setup.py'"'"'; file='"'"'/tmp/pip-install-vo7fz92g/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-8p0nkdla/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.9/pyodbc
remote: cwd: /tmp/pip-install-vo7fz92g/pyodbc/
remote: Complete output (14 lines):
remote: running install
remote: running build
remote: running build_ext
remote: building 'pyodbc' extension
remote: creating build
remote: creating build/temp.linux-x86_64-3.9
remote: creating build/temp.linux-x86_64-3.9/src
remote: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0.30 -I/app/.heroku/python/include/python3.9 -c src/buffer.cpp -o build/temp.linux-x86_64-3.9/src/buffer.o -Wno-write-strings
remote: In file included from src/buffer.cpp:12:0:
remote: src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
remote: #include <sql.h>
remote: ^~~~~~~
remote: compilation terminated.
remote: error: command '/usr/bin/gcc' failed with exit code 1
remote: ----------------------------------------
remote: ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vo7fz92g/pyodbc/setup.py'"'"'; file='"'"'/tmp/pip-install-vo7fz92g/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-8p0nkdla/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.9/pyodbc Check the logs for full command output.
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: 982ec36d1895c28b4e2e543383743b53a54d8c86
remote: !
remote: ! We have detected that you have triggered a build from source code with version 982ec36d1895c28b4e2e543383743b53a54d8c86
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 medipolis-keika.
remote:
To https://git.heroku.com/medipolis-keika.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/medipolis-keika.git'
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/11/10 13:18
2020/11/10 13:27
2020/11/10 13:47
2020/11/10 13:52
2020/11/10 13:53
2020/11/10 14:04
2020/11/10 14:14
2020/11/10 14:58