#1
by
Felicity
(edited )
Hi All,
I get the following error when I upload my oTree zip file on oTree Hub. My Python Interpreter is 3.12 and the numpy package I installed is the latest version 2.3.0. I updated my requirements.txt file to indicate this numpy version and now I get the following build failed result. Does anyone have any suggestion or solution for this?
Failed
Time
25 seconds ago
Build output
-----> Building on the Heroku-24 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python 3.9.16 specified in runtime.txt
[1;33m ! Warning: The runtime.txt file is deprecated.[0m
[1;33m ! [0m
[1;33m ! The runtime.txt file is deprecated since it has been replaced[0m
[1;33m ! by the more widely supported .python-version file:[0m
[1;33m ! https://devcenter.heroku.com/changelog-items/3141[0m
[1;33m ! [0m
[1;33m ! Please switch to using a .python-version file instead.[0m
[1;33m ! [0m
[1;33m ! Delete your runtime.txt file and create a new file in the[0m
[1;33m ! root directory of your app named:[0m
[1;33m ! .python-version[0m
[1;33m ! [0m
[1;33m ! Make sure to include the '.' character at the start of the[0m
[1;33m ! filename. Don't add a file extension such as '.txt'.[0m
[1;33m ! [0m
[1;33m ! In the new file, specify your app's major Python version number[0m
[1;33m ! only. Don't include quotes or a 'python-' prefix.[0m
[1;33m ! [0m
[1;33m ! For example, to request the latest version of Python 3.9,[0m
[1;33m ! update your .python-version file so it contains exactly:[0m
[1;33m ! 3.9[0m
[1;33m ! [0m
[1;33m ! We strongly recommend that you don't specify the Python patch[0m
[1;33m ! version number, since it will pin your app to an exact Python[0m
[1;33m ! version and so stop your app from receiving security updates[0m
[1;33m ! each time it builds.[0m
[1;33m ! [0m
[1;33m ! In the future support for runtime.txt will be removed and[0m
[1;33m ! this warning will be made an error.[0m
[1;33m ! Warning: Support for Python 3.9 is ending soon![0m
[1;33m ! [0m
[1;33m ! Python 3.9 will reach its upstream end-of-life in October 2025,[0m
[1;33m ! at which point it will no longer receive security updates:[0m
[1;33m ! https://devguide.python.org/versions/#supported-versions[0m
[1;33m ! [0m
[1;33m ! As such, support for Python 3.9 will be removed from this[0m
[1;33m ! buildpack on 7th January 2026.[0m
[1;33m ! [0m
[1;33m ! Upgrade to a newer Python version as soon as possible, by[0m
[1;33m ! changing the version in your runtime.txt file.[0m
[1;33m ! [0m
[1;33m ! For more information, see:[0m
[1;33m ! https://devcenter.heroku.com/articles/python-support#supported-python-versions[0m
[1;33m ! Warning: A Python patch update is available![0m
[1;33m ! [0m
[1;33m ! Your app is using Python 3.9.16, however, there is a newer[0m
[1;33m ! patch release of Python 3.9 available: 3.9.23[0m
[1;33m ! [0m
[1;33m ! It is important to always use the latest patch version of[0m
[1;33m ! Python to keep your app secure.[0m
[1;33m ! [0m
[1;33m ! Update your runtime.txt file to use the new version.[0m
[1;33m ! [0m
[1;33m ! We strongly recommend that you don't pin your app to an[0m
[1;33m ! exact Python version such as 3.9.16, and instead only specify[0m
[1;33m ! the major Python version of 3.9 in your runtime.txt file.[0m
[1;33m ! This will allow your app to receive the latest available Python[0m
[1;33m ! patch version automatically and prevent this warning.[0m
-----> Discarding cache since:
- The contents of requirements.txt changed
-----> Installing Python 3.9.16
-----> Installing pip 25.1.1, setuptools 70.3.0 and wheel 0.45.1
-----> Installing SQLite3
-----> Installing dependencies using 'pip install -r requirements.txt'
Collecting otree==5.10.3 (from -r requirements.txt (line 2))
Downloading otree-5.10.3.tar.gz (451 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting psycopg2>=2.8.4 (from -r requirements.txt (line 3))
Downloading psycopg2-2.9.10.tar.gz (385 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting sentry-sdk>=0.7.9 (from -r requirements.txt (line 4))
Downloading sentry_sdk-2.29.1-py2.py3-none-any.whl.metadata (10 kB)
ERROR: Ignored the following versions that require a different python version: 2.1.0 Requires-Python >=3.10; 2.1.0rc1 Requires-Python >=3.10; 2.1.1 Requires-Python >=3.10; 2.1.2 Requires-Python >=3.10; 2.1.3 Requires-Python >=3.10; 2.2.0 Requires-Python >=3.10; 2.2.0rc1 Requires-Python >=3.10; 2.2.1 Requires-Python >=3.10; 2.2.2 Requires-Python >=3.10; 2.2.3 Requires-Python >=3.10; 2.2.4 Requires-Python >=3.10; 2.2.5 Requires-Python >=3.10; 2.2.6 Requires-Python >=3.10; 2.3.0 Requires-Python >=3.11; 2.3.0rc1 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement numpy==2.3.0 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0, 1.25.1, 1.25.2, 1.26.0, 1.26.1, 1.26.2, 1.26.3, 1.26.4, 2.0.0, 2.0.1, 2.0.2)
ERROR: No matching distribution found for numpy==2.3.0
[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
Felicity
In case anyone's facing this problem as well due to upgrading to Heroku-24 stack, I reinstalled otree and then uploaded it on oTree Hub. The build was successful then.