opendatahub-io / notebooks

Notebook images for ODH
Apache License 2.0
15 stars 51 forks source link

Create `Pipfile.lock`s with the Python version that is used in the respective image #574

Open jiridanek opened 3 weeks ago

jiridanek commented 3 weeks ago

Aha, understood. When you updated Pipfile.lock before, you did not run whatever command you used on Python version 3.8, but you used a newer Python?

_Originally posted by @jiridanek in https://github.com/opendatahub-io/notebooks/pull/572#discussion_r1644550716_

jiridanek commented 3 weeks ago

From the discussions below, pip has --python option that can be specified to run resolution as if on a different Python version.

It does not seem possible to put something into Pipfile itself to pin Python version.

guimou commented 2 weeks ago

It does not seem possible to put something into Pipfile itself to pin Python version.

Of course you can. Example: https://github.com/opendatahub-io-contrib/workbench-images/blob/8c1c0cf735c6754fdaa332f83056dc386549ff75/base/c9s/3.11/Pipfile#L14

It's in the requirements file that you cannot set it. But that should not be a problem, because you use the requirements file in an already installed Python environment, so you have already chosen your version.