ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. [FLASK]

会有一股神秘感。 提交于 2020-12-26 03:39:24

问题


ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

When i try to push my flask app to Heroku the following error shows up in my terminal and the build fails.

I can't figure out what's wrong here is the full error:

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'

Here is my 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

Please help me it's my first time deploying an app to production. I am using linux with with python3.6. Thanks for any help.


回答1:


The Feature feature was removed from setuptools at version v46.0.0. To fix your problem either you need to upgrade MarkupSafe to a later version or downgrade setuptools to version < v46.0.0.

Try the latest MarkupSafe 1.1.1.



来源:https://stackoverflow.com/questions/65404788/error-command-errored-out-with-exit-status-1-python-setup-py-egg-info-check-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!