django - '“错误:未找到 .egg-info 目录”在部署到 heroku 期间
问题描述
您好,我正在 Heroku 上部署我的第一个项目,但出现错误:
ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-wgaqr45r
我曾尝试更新 setuptools,但事实并非如此。有什么想法会出什么问题吗?
我的 git bash 命令:
gg@DESKTOP-PNHHOHJ MINGW64 /c/projekty/tabele/tabenv (master)
$ git push heroku master
Enumerating objects: 9199, done.
Counting objects: 100% (9199/9199), done.
Delta compression using up to 4 threads
Compressing objects: 100% (5826/5826), done.
Writing objects: 100% (9199/9199), 17.71 MiB | 4.97 MiB/s, done.
Total 9199 (delta 2302), reused 9182 (delta 2296), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Python app detected
remote: cp: cannot stat '/tmp/build_8554d289/requirements.txt': No such file or directory
remote: -----> Installing python-3.8.8
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Obtaining file:///tmp/build_8554d289 (from -r /tmp/build_8554d289/requirements.txt (line 1))
remote: ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-wgaqr45r
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 830c4b88b9a54ed95a860492a144d53bf95172c0
remote: !
remote: ! We have detected that you have triggered a build from source code with version 830c4b88b9a54ed95a860492a144d53bf95172c0
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are 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: Verifying deploy...
remote:
remote: ! Push rejected to thawing-falls-31558.
remote:
To https://git.heroku.com/thawing-falls-31558.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/thawing-falls-31558.git'
(tabenv)
gg@DESKTOP-PNHHOHJ MINGW64 /c/projekty/tabele/tabenv (master)
$ python.exe -m pip install --upgrade setuptools pip
Requirement already satisfied: setuptools in c:\projekty\tabele\tabenv\lib\site-packages (54.0.0)
Requirement already satisfied: pip in c:\projekty\tabele\tabenv\lib\site-packages (21.0.1)
(tabenv)
解决方案
推荐阅读
- c - 共享库中定义的变量的内存位置
- python - 从一列熊猫数据框创建字典
- c++ - 用数组覆盖数组
- swift - 如何查询firebase数据childByAutoID?
- variables - 通过 Ansible “terraform” 模块执行 Terraform。需要的字符串集
- python - 如何在 django admin 主模板上添加按钮?
- apache-spark - 当 Spark 发现一个动作时,会运行每一行代码,直到该动作或仅与该动作相关的转换?
- dompdf - dompdf 文档和示例到哪里去了?
- c# - 将 listView 表导出到 Excel
- python - 如何在以下代码中修复 Python 中的“int object is not subscriptable”?