Getting two unknown error while trying to upload my app to Heroku

淺唱寂寞╮ 提交于 2020-12-13 04:33:05

问题


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 

回答1:


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 was released in 2012. It's simply too old, it only supports Python 2.

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



来源:https://stackoverflow.com/questions/61408260/getting-two-unknown-error-while-trying-to-upload-my-app-to-heroku

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!