在尝试上传我的应用程序到Heroku时,得到两个未知的错误。

问题描述 投票:0回答:1

在过去的2个小时里,我一直在尝试将我的应用程序部署到Heroku,但我得到了很多错误。我安装了python 3.8.2。先谢谢你

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 
python git heroku pip
1个回答
1
投票

SynaxErrorexcept pkg_resources.VersionConflict, e: 意味着这段代码是为Python 2设计的,但您是用Python 3执行的。

xattr 0.6.4 是在 2012 年发布的。它实在是太老了,它只支持Python 2。

所以,要么使用Python 2来编写代码,要么升级 xattr新版.

© www.soinside.com 2019 - 2024. All rights reserved.