尝试将我的应用上传到Heroku时出现两个未知错误 [英] Getting two unknown error while trying to upload my app to Heroku

查看:110
本文介绍了尝试将我的应用上传到Heroku时出现两个未知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去2个小时,我一直在尝试将我的应用程序部署到Heroku,但我遇到了很多错误.我已经安装了python 3.8.2.预先感谢

I've been the past 2 hours trying to deploy my app to Heroku but i'm getting a lot of errors. I have python 3.8.2 installed. Thanks in advance

remote:          Collecting xattr==0.6.4
remote:          Downloading xattr-0.6.4.tar.gz (15 kB)

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-zvu2zply/xattr/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zvu2zply/xattr/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-install-zvu2zply/xattr/pip-egg-info
remote:                 cwd: /tmp/pip-install-zvu2zply/xattr/
remote:            Complete output (8 lines):
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:              File "/tmp/pip-install-zvu2zply/xattr/setup.py", line 3, in <module>
remote:                import ez_setup
remote:              File "/tmp/pip-install-zvu2zply/xattr/ez_setup.py", line 106
remote:                except pkg_resources.VersionConflict, e:
remote:                                                    ^
remote:            SyntaxError: invalid syntax
remote:            ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: python 

推荐答案

SynaxError位于except pkg_resources.VersionConflict, e:,表示该代码适用于Python 2,但您正在使用Python 3执行该代码.

SynaxError at except pkg_resources.VersionConflict, e: means the code is intended for Python 2 but you're executing it with Python 3.

xattr 0.6.4 于2012年发布.旧版本,仅支持Python 2.

xattr 0.6.4 was released in 2012. It's simply too old, it only supports Python 2.

因此,您可以使用Python 2进行编码,或者将xattr升级到更高版本.

So either use Python 2 for you code or upgrade xattr to a later version.

这篇关于尝试将我的应用上传到Heroku时出现两个未知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆