Heroku构建错误:python setup.py egg_info检查日志以获得完整的命令输出
我用python制作了一个discord机器人,我使用heroku让它一直处于活动状态。但我得到了这个错误: Python v:Python-3.6.12 pip V:pip 20.1.1 我正在从github存储文件。 生成日志:Heroku构建错误:python setup.py egg_info检查日志以获得完整的命令输出,python,heroku,discord.py,Python,Heroku,Discord.py,我用python制作了一个discord机器人,我使用heroku让它一直处于活动状态。但我得到了这个错误: Python v:Python-3.6.12 pip V:pip 20.1.1 我正在从github存储文件。 生成日志: -----> Python app detected -----> Requirements file has been changed, clearing cached dependencies -----> Instal
-----> Python app detected
-----> Requirements file has been changed, clearing cached dependencies
-----> Installing python-3.6.12
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting discord.py
Downloading discord.py-1.4.1-py3-none-any.whl (692 kB)
Collecting dotenv
Downloading dotenv-0.0.5.tar.gz (2.4 kB)
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-48vcijro/dotenv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-48vcijro/dotenv/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-jv5uu9gr
cwd: /tmp/pip-install-48vcijro/dotenv/
Complete output (51 lines):
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-88ew355d/distribute/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-88ew355d/distribute/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-u1lq2jqi
cwd: /tmp/pip-wheel-88ew355d/distribute/
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-wheel-88ew355d/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/pip-wheel-88ew355d/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/pip-wheel-88ew355d/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/tmp/pip-wheel-88ew355d/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/pip-wheel-88ew355d/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/pip-wheel-88ew355d/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/app/.heroku/python/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/app/.heroku/python/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmphf4kpj7d', '--quiet', 'distribute']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-48vcijro/dotenv/setup.py", line 23, in <module>
scripts=['scripts/dotenv']
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/__init__.py", line 160, in setup
_install_setup_requires(attrs)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/__init__.py", line 155, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/app/.heroku/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/app/.heroku/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/app/.heroku/python/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/app/.heroku/python/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmphf4kpj7d', '--quiet', 'distribute']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
! Push rejected
, failed to compile Python app.
! Push failed
检测到Python应用程序
----->需求文件已更改,正在清除缓存的依赖项
----->安装python-3.6.12
----->安装pip 20.1.1、设置工具47.1.1和车轮0.34.2
----->安装SQLite3
----->pip的安装要求
收集不和谐.py
下载discord.py-1.4.1-py3-none-any.whl(692 kB)
收集点
下载dotenv-0.0.5.tar.gz(2.4KB)
错误:命令出错,退出状态为1:
命令:/app/.heroku/python/bin/python-c'import sys,setuptools,tokenize;sys.argv[0]=“”/tmp/pip-install-48vcijro/dotenv/setup.py“”__文件\ \='''''''/tmp/pip-install-48vcijro/dotenv/setup.py''';f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“'exec'”)'egg\u info--egg base/tmp/pip-pip-egg-info-jv5uu9gr
cwd:/tmp/pip-install-48vcijro/dotenv/
完整输出(51行):
错误:命令出错,退出状态为1:
命令:/app/.heroku/python/bin/python-c'import sys,setuptools,tokenize;sys.argv[0]=''''/tmp/pip-wheel-88ew355d/distribute/setup.py''__文件\ \='''''''/tmp/pip-wheel-88ew355d/distribute/setup.py''';f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“'exec'”)“鸡蛋信息——鸡蛋库/tmp/pip-pip-egg-info-u1llq2jqi
cwd:/tmp/pip-wheel-88ew355d/分配/
完整输出(15行):
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/tmp/pip-wheel-88ew355d/distribute/setuptools/_init__.py”,第2行,在
从setuptools.extension导入扩展,库
文件“/tmp/pip-wheel-88ew355d/distribute/setuptools/extension.py”,第5行,在
从setuptools.dist导入\u获取\u取消修补
文件“/tmp/pip-wheel-88ew355d/distribute/setuptools/dist.py”,第7行,在
从setuptools.command.install导入安装
文件“/tmp/pip-wheel-88ew355d/distribute/setuptools/command/_init__.py”,第8行,在
从setuptools.command导入安装脚本
文件“/tmp/pip-wheel-88ew355d/distribute/setuptools/command/install_scripts.py”,第3行,在
从pkg_资源导入分发,路径元数据,确保_目录
文件“/tmp/pip-wheel-88ew355d/distribute/pkg_resources.py”,第1518行,在
注册加载程序类型(importlib\u bootstrap.SourceFileLoader,DefaultProvider)
AttributeError:模块“importlib.\u引导程序”没有属性“SourceFileLoader”
----------------------------------------
错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获得完整的命令输出。
回溯(最近一次呼叫最后一次):
文件“/app/.heroku/python/lib/python3.6/site packages/setuptools/installer.py”,第128行,在fetch\u build\u egg中
子进程检查调用(cmd)
文件“/app/.heroku/python/lib/python3.6/subprocess.py”,第311行,在check_调用中
引发被调用的进程错误(retcode,cmd)
subprocess.CalledProcessError:命令“['/app/.heroku/python/bin/python'、'-m'、'pip'、'--disable-pip version check'、'wheel'、'-no-deps'、'-w'、'/tmp/tmphf4kpj7d'、'--quiet'、'distribute']'返回非零退出状态1。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/tmp/pip-install-48vcijro/dotenv/setup.py”,第23行,在
脚本=['scripts/dotenv']
文件“/app/.heroku/python/lib/python3.6/site packages/setuptools/\uuuu init\uuuuu.py”,第160行,在安装程序中
_安装\u安装\u需要(属性)
文件“/app/.heroku/python/lib/python3.6/site packages/setuptools/\uuuuu init\uuuuuuuuuu.py”,第155行,在安装程序中
dist.fetch\u build\u鸡蛋(dist.setup\u需要)
文件“/app/.heroku/python/lib/python3.6/site packages/setuptools/dist.py”,第698行,在fetch\u build\u中
替换_=True,
文件“/app/.heroku/python/lib/python3.6/site packages/pkg_resources/_init__.py”,第783行,在resolve中
替换冲突=替换冲突
文件“/app/.heroku/python/lib/python3.6/site packages/pkg_resources/_init__.py”,第1066行,最佳匹配
返回自获取(请求,安装程序)
文件“/app/.heroku/python/lib/python3.6/site packages/pkg_resources/_init__.py”,第1078行,获取
返回安装程序(要求)
文件“/app/.heroku/python/lib/python3.6/site packages/setuptools/dist.py”,第754行,在fetch\u build\u egg中
返回获取\构建\蛋(自身,需要)
文件“/app/.heroku/python/lib/python3.6/site packages/setuptools/installer.py”,第130行,在fetch\u build\u egg中
升高距离错误(str(e))
distutils.errors.DistutilsError:Command'['/app/.heroku/python/bin/python','-m',pip','--disable-pip-version-check',wheel','--no-dep