首页 > 解决方案 > '“错误:未找到 .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)

标签: djangoheroku

解决方案


推荐阅读