What version of Python does Astronomer support?

I’m trying to figure out what version of Python I need to have installed to run Astronomer!

By default, Astronomer ships with python 3.7 with plans to support python 3.8 in the near future.

If you need to run code on older versions of python, there are a few options available to you.

You can use this operator to run PythonOperators with a different version of python. Just be sure to add whatever version of python you are using to the packages.txt file.

If you add the version of python you want into the packages.txt file, you can manually call other python files in your project with a bash command. Note for this approach, you will have to build in the python files you want to call into your project.

You can build an external image with whatever version of python you want and run that image on Astronomer with this operator. This approach will also let you specify resources for that task regardless of what kind of executor you are using and allow you to manage your code for that particular task completely independently of Airflow.

If none of these solutions work, contact us and we can dive a little deeper into your use case to figure out something that does!


are there any updates around python 3.8 support?

Hi @Marek ! The Astronomer Certified (AC) Python Wheel supports Python versions 3.6, 3.7, and 3.8, but our ap-airflow Docker images have been built and primarily tested only with Python 3.7.

With that said, you’re free to customize your image with a different version of Python. To do so, you would create a custom version of the image, specify the PYTHON_MAJOR_MINOR_VERSION build argument, and push the custom image to an existing Docker registry.

For detailed guidelines, refer to “Build with a Different Python Version”. Want to check that out, and let us know if you have any trouble?