Hi, did anyone have this error while trying to run...
# ask-for-help
s
Hi, did anyone have this error while trying to run
containerize
?
Copy code
0.166 Installing pip packages from 'requirements.lock.txt'..
0.167 + pip_install -r /home/bentoml/bento/env/python/requirements.lock.txt
0.167 + command -v uv
0.167 + uv pip install -r /home/bentoml/bento/env/python/requirements.lock.txt
0.209   × No solution found when resolving dependencies:
0.209   ╰─▶ Because the current Python version (3.9.20) does not satisfy
0.209       Python>=3.10 and numpy==2.1.1 depends on Python>=3.10, we can conclude
0.209       that numpy==2.1.1 cannot be used.
0.209       And because you require numpy==2.1.1, we can conclude that your
0.209       requirements are unsatisfiable.
I tried running with an empty requirements file or a single requirement that is not numpy and still got the error. this is what i added to the bentofile:
Copy code
python:
  requirements_txt: "./requirements.txt"
docker:
  distro: debian
  python_version: "3.9"
and when deleting the requirements_txt from the bentofile everything worked fine
s
We are using python 3.9 and have pinned the following in our requirements.txt:
Copy code
numpy==1.24.4   # numpy 2.0 breaks backward compatibility on existing libraries
scipy==1.13.1   # scipy 1.14.0 requires python 3.10+
dask==2024.6.2  # dask==2024.7.0 removed pandas 2 support. that breaks bentoml build.
pydantic==2.8.2
s
Thanks, that indeed solves the problem, I just don't understand where this requirement is coming from
s
They are transient dependencies that bentoml dependent on but were upgraded independently and broke bentoml. It is not easy for an open-source library like bentoml to pin specific versions while preserving certain backward compatibility to previous bentoml versions. We had to find out in the hard way.
🥲 1
s
thanks for the help!
👍 1
j
CC: @Frost Ming
f
build bento on python 3.9 as well
or change
lock_packages
to
false
s
changing
lock_packages
to
false
worked, thank you very much!