简体   繁体   English

命令出错,退出状态为 1:

[英]Command errored out with exit status 1:

I have problem when i try to push my app on heroku, so when i write git push heroku master this error is appear当我尝试在 heroku 上推送我的应用程序时遇到问题,所以当我写 git push heroku master 时出现此错误

    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-48na90v5/importlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-48na90v5/importlib/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-dccx97n0       
    remote:                 cwd: /tmp/pip-install-48na90v5/importlib/
    remote:            Complete output (11 lines):
    remote:            Traceback (most recent call last):
    remote:              File "<string>", line 1, in <module>
    remote:              File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/__init__.py", line 5, in <module>
    remote:                import distutils.core
    remote:              File "/app/.heroku/python/lib/python3.6/distutils/core.py", line 16, in <module>
    remote:                from distutils.dist import Distribution
    remote:              File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 19, in <module>
    remote:                from distutils.util import check_environ, strtobool, rfc822_escape
    remote:              File "/app/.heroku/python/lib/python3.6/distutils/util.py", line 9, in <module>
    remote:                import importlib.util
    remote:            ModuleNotFoundError: No module named 'importlib.util'
    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

Most probably it is the issue with libraries you are trying to install check for the versions as currently heroku uses latest version of python很可能是您尝试安装的库的问题,因为当前 heroku 使用最新版本的 python

or just change the python version specific to your project on heroku by using runtime.txt file in your root directory或者只是使用根目录中的 runtime.txt 文件更改 heroku 上项目特定的 python 版本

I had also faced the exact same issue which I fixed by installing latest versions of the dependencies.我也遇到了完全相同的问题,我通过安装最新版本的依赖项解决了这个问题。

Try;尝试; definitely it will work.肯定会奏效的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM