【问题标题】:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. [FLASK]错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出。 [烧瓶]
【发布时间】:2021-03-31 22:13:47
【问题描述】:

ERROR: Command errored out with exit status 1: python setup.py egg_info 检查日志以获取完整的命令输出

当我尝试将我的烧瓶应用推送到Heroku 时,我的终端中显示以下错误并且构建失败。

我无法弄清楚这里有什么问题是完整的错误:

Counting objects: 6422, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5375/5375), done.
Writing objects: 100% (6422/6422), 18.81 MiB | 668.00 KiB/s, done.
Total 6422 (delta 2146), reused 4421 (delta 868)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing python-3.6.12
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting bcrypt==3.2.0
remote:          Downloading bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl (63 kB)
remote:        Collecting Flask==1.1.2
remote:          Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
remote:        Collecting Flask-Bcrypt==0.7.1
remote:          Downloading Flask-Bcrypt-0.7.1.tar.gz (5.1 kB)
remote:        Collecting flask-pwa==0.1.0
remote:          Downloading flask_pwa-0.1.0-py3-none-any.whl (140 kB)
remote:        Collecting Flask-Session==0.3.2
remote:          Downloading Flask_Session-0.3.2-py2.py3-none-any.whl (7.4 kB)
remote:        Collecting Flask-SQLAlchemy==2.4.4
remote:          Downloading Flask_SQLAlchemy-2.4.4-py2.py3-none-any.whl (17 kB)
remote:        Collecting flask-template==0.4.4
remote:          Downloading flask_template-0.4.4-py3-none-any.whl (32 kB)
remote:        Collecting Flask-WhooshAlchemy==0.56
remote:          Downloading Flask-WhooshAlchemy-0.56.tar.gz (8.5 kB)
remote:        Collecting gunicorn==20.0.4
remote:          Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
remote:        Collecting itsdangerous==1.1.0
remote:          Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
remote:        Collecting Jinja2==2.11.2
remote:          Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
remote:        Collecting MarkupSafe==1.0
remote:          Downloading MarkupSafe-1.0.tar.gz (14 kB)
remote:            ERROR: Command errored out with exit status 1:
remote:             command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a2gejoxi/MarkupSafe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a2gejoxi/MarkupSafe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hgdhn9un
remote:                 cwd: /tmp/pip-install-a2gejoxi/MarkupSafe/
remote:            Complete output (5 lines):
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:              File "/tmp/pip-install-a2gejoxi/MarkupSafe/setup.py", line 6, in <module>
remote:                from setuptools import setup, Extension, Feature
remote:            ImportError: cannot import name 'Feature'
remote:            ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to <app name>.
remote: 
To https://git.heroku.com/<app name>.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/<app name>.git'

这是我的 requirements.txt:

bcrypt==3.2.0
Flask==1.1.2
Flask-Bcrypt==0.7.1
flask-pwa==0.1.0
Flask-Session==0.3.2
Flask-SQLAlchemy==2.4.4
flask-template==0.4.4
Flask-WhooshAlchemy==0.56
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.0
python-dotenv==0.15.0
razorpay==1.2.0
SQLAlchemy==1.3.20
sqlparse==0.4.1
validate-email==1.3
virtualenv==15.1.0
Werkzeug==1.0.1
Whoosh==2.7.4

请帮助我,这是我第一次将应用部署到生产环境。 我正在使用linuxwith python3.6感谢您的帮助

【问题讨论】:

    标签: python flask heroku pip


    【解决方案1】:

    Feature 功能已从 setuptools 版本 v46.0.0 中删除。要解决您的问题,您需要将MarkupSafe 升级到更高版本或将setuptools 降级到版本v46.0.0。

    尝试最新的MarkupSafe 1.1.1。

    【讨论】:

    • pip install --upgrade setuptools==45 已修复。
    • @hoper &lt; v46 正如我所说的。
    猜你喜欢
    • 1970-01-01
    • 2020-03-03
    • 2020-02-17
    • 1970-01-01
    • 2021-09-03
    • 2020-04-07
    • 1970-01-01
    • 2021-04-15
    • 2020-04-12
    相关资源
    最近更新 更多