我也尝试过使用echo命令,我在github上也有它,但由于某些原因,它不会被检测到。以下是我在CCD_;worker:python main.py">
这是构建日志:
-----> Python app detected
-----> Installing python-3.8.5
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting certifi==2020.6.20
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
Collecting chardet==3.0.4
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna==2.10
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting oauthlib==3.1.0
Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Collecting PySocks==1.7.1
Downloading PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting requests==2.24.0
Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting requests-oauthlib==1.3.0
Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting six==1.15.0
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting tweepy==3.9.0
Downloading tweepy-3.9.0-py2.py3-none-any.whl (30 kB)
Collecting urllib3==1.25.10
Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
Installing collected packages: certifi, chardet, idna, oauthlib, PySocks, urllib3, requests, requests-oauthlib, six, tweepy
Successfully installed PySocks-1.7.1 certifi-2020.6.20 chardet-3.0.4 idna-2.10 oauthlib-3.1.0 requests-2.24.0 requests-oauthlib-1.3.0 six-1.15.0 tweepy-3.9.0 urllib3-1.25.10
-----> Discovering process types
-----> Compressing...
Done: 53.2M
-----> Launching...
Released v3
https://twitterbot1k.herokuapp.com/ deployed to Heroku
`
您是否在根目录中添加了requirements.txt文件?当我忘记添加requirements.txt时,我也遇到了类似的问题。如果不需要任何额外的包,请创建空文件。它告诉Heroku您的应用程序是用Python编写的。