繁体   English   中英

错误:无效的要求:'asgiref 3.5.2'

[英]ERROR: Invalid requirement: 'asgiref 3.5.2'

我是heroku的新手,我想部署一个简单的应用程序,当我推送到heroku时,它给了我下面的错误。 不幸的是,我在网上查了一下,没有找到正确的答案。

给出的错误

       Enumerating objects: 73, done.
Counting objects: 100% (73/73), done.
Delta compression using up to 4 threads
Compressing objects: 100% (71/71), done.
Writing objects: 100% (73/73), 24.58 KiB | 719.00 KiB/s, done.
Total 73 (delta 11), reused 0 (delta 0), pack-reused 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: -----> No Python version was specified. Using the buildpack default: python-3.10.4
remote:        To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.10.4
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        ERROR: Invalid requirement: 'asgiref        3.5.2' (from line 1 of /tmp/build_44a6c2b3/requirements.txt)
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to olakaymytodo.
remote:
To https://git.heroku.com/olakaymytodo.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/olakaymytodo.git'

我不知道我做错了什么使我的 requirements.txt 文件如下所示

requirements.txt 文件


asgiref        3.5.2
Django         4.0.4
django-environ 0.8.1
environ        1.0
gunicorn       20.1.0
Pillow         9.1.1
pip            22.0.4
psycopg2       2.9.3
setuptools     62.1.0
sqlparse       0.4.2
tzdata         2022.1
wheel          0.37.1

是asgiref版本吗? 我在网上搜索,但没有得到正确的答案。 我希望这里有人可以提供帮助。

requirements.txt应该是这样的,

试试看,

asgiref==3.5.2
Django==4.0.4
django-environ==0.8.1
environ==1.0
gunicorn==20.1.0
Pillow==9.1.1
pip==22.0.4
psycopg2==2.9.3
setuptools==62.1.0
sqlparse==0.4.2
tzdata==2022.1
wheel==0.37.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM