【问题标题】:Getting two unknown error while trying to upload my app to Heroku尝试将我的应用上传到 Heroku 时出现两个未知错误
【发布时间】:2020-08-08 00:28:54
【问题描述】:

过去 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 

【问题讨论】:

  • 我该如何改变呢? @skaul05

标签: python git heroku pip


【解决方案1】:

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

xattr 0.6.4 于 2012 年发布。它太老了,它只支持 Python 2。

所以要么使用 Python 2 编写代码,要么将 xattr 升级到 later version

【讨论】:

    猜你喜欢
    • 2020-06-23
    • 2019-05-29
    • 1970-01-01
    • 2020-08-20
    • 1970-01-01
    • 1970-01-01
    • 2016-07-08
    • 2016-09-17
    相关资源
    最近更新 更多