微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决我在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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。