python - 使用 python 3.8 将 Django 部署到 heroku
问题描述
我正在尝试将我的 django 应用程序部署到 Heroku。
但是当我这样做时
git push heroku master
我收到以下错误:
remote: -----> Python app detected
remote: ! Requested runtime (python-3.8) is not available for this stack (heroku-18).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to djangomessagesapi.
remote:
To https://git.heroku.com/djangomessagesapi.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/djangomessagesapi.git'
我已更改 runtime.txt 文件中的 python 版本,但返回相同的错误。
更新
我已经设法通过在 runtime.txt 中更改为 python 3.6 来传递它。但是在运行时我得到一个新的错误:
remote: ERROR: Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r /tmp/build_07acbad0cae4c62609ee48dc9cec3685/requirements.txt (line 22)) (from versions: none)
remote: ERROR: No matching distribution found for pkg-resources==0.0.0 (from -r /tmp/build_07acbad0cae4c62609ee48dc9cec3685/requirements.txt (line 22))
解决方案
推荐阅读
- vuejs2 - 将传统的 html/js 文件包含到现有的 vue 项目中
- c++ - 如何更快地读取文本文件并使用标记器处理数据?
- python - Python Selenium - 崩溃后是否关闭?
- javascript - 在 jquery 的特定列中的 html 表中附加 $
- java - 如何使用路径和请求参数在springboot中创建/调用rest控制器
- rest - 我可以将我的 sonarqube 服务器用于任何 git 存储库吗?
- vbscript - 为什么我不能在我的 VBScript 中设置一个可变日期,它会逐渐变化
- java - 如何在java中正确实现地图?
- node.js - 为什么 npm install with git+ssh install 与 https 不同?
- pytorch - 有哪些方法可以加快 Pytorch 中大型稀疏数组(~100 万 x 100 万,密度~0.0001)的数据加载速度?