#1 by qzyyb123
Hi everyone,
I have received the information below, it seems that otree uses python 3.12.5 which is not supportive in the latest version of otree 5.10 I used. How to fix it? Thanks for your help!
-----> Building on the Heroku-24 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python 3.12.5 specified in runtime.txt
-----> Discarding cache since:
- The Python version has changed from 3.9.7 to 3.12.5
- The contents of requirements.txt changed
-----> Installing Python 3.12.5
[1;33m ! Warning: A Python security update is available![0m
[1;33m ! [0m
[1;33m ! Upgrade as soon as possible to: Python 3.12.8[0m
[1;33m ! See: https://devcenter.heroku.com/articles/python-runtimes[0m
-----> Installing pip 24.3.1, setuptools 70.3.0 and wheel 0.45.1
-----> Installing SQLite3
-----> Installing dependencies using 'pip install -r requirements.txt'
Collecting otree==5.10.1 (from -r requirements.txt (line 2))
Downloading otree-5.10.1.tar.gz (450 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
**********************************************************************************
* Error: This version of oTree is only compatible with these Python versions:
* 3.7, 3.8, 3.9, 3.10, 3.11
**********************************************************************************
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[1;31m ! Error: Unable to install dependencies using pip.[0m
[1;31m ! [0m
[1;31m ! See the log output above for more information.[0m
! Push rejected, failed to compile Python app.
! Push failed
#2 by qzyyb123
Hi everyone, I have tried to write the runtime.txt in python 3.11 which, however, will always be deleted whenever I otree zip it. And it returns back to the default 3.12 and gives the error message....
#3 by qzyyb123
I also tried different ways like put different Otree version or Heroku stack 20, 22 or 24. All don't work, it seems that whenver I otree zip, it will set a runtime txt to python 3.12.....