尝试将我的应用上载到Heroku时出现两个未知错误

2024-04-29 04:14:24 发布

您现在位置:Python中文网/ 问答频道 /正文

在过去的两个小时里,我一直在尝试将我的应用程序部署到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 

Tags: installpippyremoteeggsetuplineerror
1条回答
网友
1楼 · 发布于 2024-04-29 04:14:24

SynaxErroratexcept pkg_resources.VersionConflict, e:表示该代码是针对Python2的,但您使用Python3执行它

^{} 0.6.4于2012年发布。它太旧了,只支持Python2

因此,要么使用Python2编写代码,要么将xattr升级为later version

相关问题 更多 >