python - Pipfile.lock 已过期/无法创建常规文件“requirements.txt”
问题描述
当我尝试将我的项目推送到 Heroku 时,git push heroku master
我得到以下输出:
remote: -----> Python app detected
remote: ! Python has released a security update! Please consider upgrading to python-3.7.6
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: cp: cannot create regular file '/app/tmp/cache/.heroku/requirements.txt': No such file or directory
remote: -----> Installing python-3.7.3
remote: -----> Installing pip
remote: -----> Installing dependencies with Pipenv 2018.5.18…
remote: Your Pipfile.lock (e78d47) is out of date. Expected: (d89661).
remote: Aborting deploy.
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
我试过跑步pipenv lock
,但这并没有解决问题。
我的Pipfile
样子是这样的:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
flask = "*"
gunicorn = "*"
numpy = "*"
opencv-python = "*"
[requires]
python_version = "3.7"
有任何想法吗?
解决方案
我试过跑步
pipenv lock
,但这并没有解决问题
确保提交修改Pipfile.lock
并将您的提交推送到 Heroku。仅在本地运行该命令是行不通的。
推荐阅读
- javascript - 使用javascript转义字符串中的特定字符
- php - 我在 OpenEMR 中的第一个 Symfony 2.4 组件控制器
- sapui5 - 在 SapUI5 或 OpenUI5 simple.GanttChartContainer 中,如何正确选择形状突出显示?
- vscode-extensions - 如何从 vscode 语言服务器对文本文档进行编辑?
- android - 如何在Android中拖动和删除ARCore节点?
- javascript - 如何从 Html/JS 中的工具提示复制文本
- docker - 当我可以将 HTTP 请求发送到 Mac 上相同的服务器设置时,为什么我不能将 HTTP 请求发送到在 Windows 上的 docker 映像中运行的 Django 服务器?
- javascript - 在 Javascript 中比较两个对象数组与文字值的更快方法
- android - 如何让圆形标签指示器填充 TabLayout 中的圆形标签指示器背景?
- javascript - Angular UI-Bootstrap 轮播在最新版本 2.5.0 中不起作用