我在Windows 10系统上最近安装的python + otree组合上使用“ git push heroku master”有一些困难

问题描述

感谢您的帮助。

似乎当我尝试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' 

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

解决方法

要解决Python版本的问题,请在runtime.txt根目录下创建一个名为Procfile的文件。

python-3.8.3