При деплое бота на хероку вылезает ошибка, что она значит и как ее исправить?

remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-3.7.13
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting aiofiles==0.7.0
remote:          Downloading aiofiles-0.7.0-py3-none-any.whl (13 kB)
remote:        Collecting aiohttp==3.7.4.post0
remote:          Downloading aiohttp-3.7.4.post0-cp37-cp37m-manylinux2014_x86_64.whl (1.3 MB)
remote:        Collecting async-timeout==3.0.1
remote:          Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
remote:        Collecting asyncio==3.4.3
remote:          Downloading asyncio-3.4.3-py3-none-any.whl (101 kB)
remote:        Collecting beautifulsoup4==4.9.3
remote:          Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
remote:        Collecting Cogs==0.4.4
remote:          Downloading Cogs-0.4.4.tar.gz (18 kB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'error'
remote:          error: subprocess-exited-with-error
remote:
remote:          × python setup.py egg_info did not run successfully.
remote:          │ exit code: 1
remote:          ╰─> [1 lines of output]
remote:              error in Cogs setup command: use_2to3 is invalid.
remote:              [end of output]
remote:
remote:          note: This error originates from a subprocess, and is likely not a problem with pip.
remote:        error: metadata-generation-failed
remote:
remote:        × Encountered error while generating package metadata.
remote:        ╰─> See above for output.
remote:
remote:        note: This is an issue with the package mentioned above, not pip.
remote:        hint: See above for details.
remote:  !     Push rejected, failed to compile Python app.

Ответы (1 шт):

Автор решения: tomato-magnet-regulato

Иногда команда python setup.py egg_info завершается ошибкой с кодом 1 просто потому, что в вашей системе отсутствует модуль ez_setup. В этом случае установка ez_setup может помочь вам исправить ошибку.

Шаг 1. Откройте окно командной строки с админ правами, а затем введите в нем pip install ez_setup и нажмите Enter .

Шаг 2. Если не работает, попробуйте запустить команду pip install unroll.

Шаг 3. Если он по-прежнему не работает, возможно, ваш pip не был правильно установлен/обновлен. Чтобы это исправить, попробуйте запустить команду easy_install -U setuptools. И снова запустите pip install unroll.

После того, как вы успешно установили модуль ez_setup, попробуйте установить пакет и посмотрите, будет ли исправлен код ошибки pip 1.

И статья на всякий случай: Fix python setup.py egg_info

→ Ссылка