Astro image with two versions of Python?

I have an Astro project I created, and the Dockerfile starts with FROM quay.io/astronomer/astro-runtime:8.2.0. I’m having a tough time with Python versions. See the below output from within the container.

$ python --version
Python 3.9.2
$ python3.10 --version
Python 3.10.11

Is it expected for the container to have two versions of Python installed? When I check the sys.path, I see the below:

[‘/workspaces/astro-airflow/dags/utils’, ‘/usr/local/airflow’, ‘/usr/local/lib/python310.zip’, ‘/usr/local/lib/python3.10’, ‘/usr/local/lib/python3.10/lib-dynload’, ‘’, ‘/home/astro/.local/lib/python3.10/site-packages’, ‘/usr/local/lib/python3.10/site-packages’]

However, when I add a package to requirements.txt, it installs to “/home/astro/.local/lib/python3.9/site-packages”, so my DAGs can’t find it. Am I doing something wrong, or is this some kind of bug?

Hi Phobia42, I can’t reproduce this with 8.2.0. Is there anything else I should do to reproduce this other than having FROM quay.io/astronomer/astro-runtime:8.2.0 in my Dockerfile? Did you build a custom image?
The screenshot below shows my reproduction steps:

Very strange. I’m not doing anything additional that I can see, but if you can’t reproduce it, it could very well be something with my environment. Maybe it’s passing through my Docker or something. Either way explicitly using python3.10 for commands seems to be working for me, now that I’m aware of it. The only other thing you could try is I believe I was in the scheduler container, rather than the webserver, but if you don’t see it there, it’s probably my setup. Thanks for trying to recreate!