I want to deploy python dajngo on heroku
The environment error that occurred during the push cannot be resolved.
Procfile, requirements.txt, runtime.txt have been created, manage.py and
It is placed in the same folder.
Welcome to your new app! Is displayed on heroku open.
Please teach me.
↓ Site based on heroku deployment
git push heroku main Execution content;
Corresponding source code
Enumerating objects: 368, done. Counting objects: 100% (368/368), done. Delta compression using up to 4 threads Compressing objects: 100% (296/296), done. Writing objects: 100% (368/368), 1.45 MiB | 49 .65 MiB/s, done. Total 368 (delta 88), reused 327 (delta 63), p ack-reused 0 remote: Compressing source files ... done. remote: Building source: remote: remote: remote: ----->Python app detected remote:! Python has released a security update! Please consider upgrading to python-3.6.1 2 remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes remote: ----->Installing python-3.6.10 remote: ----->Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2 remote: ----->Installing SQLite3 remote: ----->Installing requirements with pip remote: Processing/home/conda/feedstock_root/build_artifacts/asgiref_1592343924301/work remote: ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:'/ home/conda/feedstock_root/build_artifacts/asgiref_1592343924301/work' remote: remote: remote:! Push rejected, failed to compile Python app. remote: remote: remote:! Push failed remote:! remote:! ## Warning --The same version of this code has already been built: 6ad97e5b470ca2125 55ea1e2ce8f882594cc265b remote:! remote:! We have detected that you have triggered a build from source code with version 6ad97 e5b470ca212555ea1e2ce8f882594cc265b remote:! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote:! remote:! If i am 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: remote: Verifying deploy ... remote: remote: remote:! Push rejected to app name. remote: remote: To https://git.heroku.com/ App name.git ! [remote rejected] main->main (pre-receive hook declined) error: failed to push some refs to'https://git.heroku.com/appname.git'
web: gunicorn new_geodj.wsgi --log-file -
asgiref @ file: /// home/conda/feedstock_root/build_artifacts/asgiref_1592343924301/work brotlipy == 0.7.0 certifi == 2020.6.20 cffi == 1.14.0 chardet == 3.0.4 cryptography == 2.9.2 dj-database-url == 0.5.0 Django @ file: /// home/conda/feedstock_root/build_artifacts/django_1591280207983/work django-cleanup @ file: /// home/conda/feedstock_root/build_artifacts/django-cleanup_1600232200403/work django-cors-headers == 3.2.1 django-filter @ file: /// home/conda/feedstock_root/build_artifacts/django-filter_1591380509061/work django-heroku == 0.3.1. django-leaflet == 0.25.0 djangorestframework == 3.11.0 djangorestframework-gis @ file: /// home/conda/feedstock_root/build_artifacts/djangorestframework-gis_1591808353793/work fastcache == 1.1.0 future == 0.18.2 glob2 == 0.7 gunicorn == 20.0.4 idna == 2.9 importlib-metadata @ file: /// D:/bld/importlib-metadata_1591451928112/work Markdown @ file: /// home/conda/feedstock_root/build_artifacts/markdown_1589366472132/work mpmath == 1.1.0 olefile == 0.46 Pillow @ file: /// D:/bld/pillow_1594212354952/work psycopg2 == 2.8.5 pycparser == 2.20 pyOpenSSL == 19.1.0 PySocks == 1.7.1. pytz == 2020.1 requests @ file: /// home/conda/feedstock_root/build_artifacts/requests_1592425495151/work six == 1.14.0 sqlparse == 0.3.1. sympy @ file: /// D:/bld/sympy_1597017636149/work urllib3 == 1.25.9 whitenoise @ file: /// home/conda/feedstock_root/build_artifacts/whitenoise_1602596638218/work win-inet-pton == 1.1.0 wincertstore == 0.2 zipp == 3.1.0
What I tried
git push heroku main: main,
git push heroku main -force
I tried, but I get the same error.
Answer # 1
Cause in the range read
requirements.txSome of the dependent packages listed in are file path-based specifications when prepared in the local environment rather than simple versions.
Therefore, since you have specified a path that does not exist under heroku's environment, you cannot install it.Action example
The safest way is
requirements.txtI think that it is to "change the contents to the state where the file path is not specified".
pip freezeIf you use etc., it has version information instead of specifying the file path
requirements.txtYou can fix it to.
By committing that file, the installation will proceed even on the heroku environment.
Command example(It may be different in the conda environment, but please check it individually)
However, if for some reason you specify the file path as a result of editing the package locally, all the edits may be missing.
In that case, it is necessary to consider some measures separately.
- python - how can i use the environment variables set in heroku in django's viewspy?
- python - i can't deploy discordpy to heroku
- python - regular expression: sub () cannot replace the matched part
- python - idle cannot resolve the "rootgeometry" error
- python - all commands cannot be used with discord bot
- i cannot transition from the sbi securities home screen to the futures trading screen by scraping python + selenium
- python - cannot inherit a class with multiple arguments
- python - the error in building the environment to run pose estimation cannot be resolved
- python - discord bot command cannot be started
- "heroku run python managepy migrate" fails
- python - ephem module cannot be imported in vscode
- [python] cannot insert or delete to text box
- git - can't deploy to heroku i want to upload
- python - the csv file cannot be displayed
- cannot read python dat file
- python - elements cannot be acquired after screen transition in selenium
- python 3x - xg boost cannot be installed from anaconda prompt
- python - mysqlclient cannot be installed on centos7
- python - i can't push to heroku
- python : How to do date validation in Django
- python : What needs to be learned to implement reading information from the server?
- Django connect with existing mysql database
- python : How to implement separation of roles on the site
- python : User roles for creating constraints
- python : Change the data entered through the form
- python : How to use id in path?
- python : How can I send an array of html input to Django?
- python : Why are blocks not showing on the page?