0

谢谢你的帮助。

似乎当我尝试 git push heroku master 时,出现以下错误:

remote: -----> Installing python-3.6.12
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting otree>=2.5.0
remote:          Downloading otree-3.0.6.tar.gz (847 kB)
remote:            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-mka_62qe/otree/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mka_62qe/otree/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-pip-egg-info-5rga_gck
remote:                 cwd: /tmp/pip-install-mka_62qe/otree/
remote:            Complete output (3 lines):
remote:
remote:            Error: This version of oTree requires Python 3.7 or higher.
remote:
remote:            ----------------------------------------
remote:        ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to projectivity-experiment.
remote:
To https://git.heroku.com/projectivity-experiment.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/projectivity-experiment.git' 

我不确定它是关于 Python 的,因为我在计算机上安装了 3.8.5 版本,但它似乎正在安装 python-3.6.12(由于某种原因低于指示的所需 python 版本)

4

1 回答 1

0

要解决 Python 版本的问题,runtime.txt请使用您的Procfile.

python-3.8.3
于 2020-08-27T22:01:03.773 回答