How to use python3.10 in Azure Promptflow with custom image

Lai, Joseph 0 Reputation points
2025-03-17T14:33:23.8966667+00:00

I am trying to use python3.10 in Azure ML Promptflow rather than the default 3.9 in order to use semantic kernel. When I try to create the updated base image, I am getting an error that the promptflow.runtime module is not found. I have installed the promptflow and promptflow[azure] packages in my base image but I've seen that it doesn't include the promptflow-runtime package.

How would I go about upgrading my Python version while still installing the promptflow runtime?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,334 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Azar 29,520 Reputation points MVP Volunteer Moderator
    2025-03-17T16:51:30.8066667+00:00

    Hi there Lai, Joseph

    Thanks for using QandA platform

    Try to create a Docker image with Python 3.10, install dependencies, and ensure promptflow-runtime is included. Use an Azure ML base image, install Python 3.10, upgrade pip, and add:

    pip install promptflow promptflow[azure] promptflow-runtime
    

    Set Python 3.10 in your environment and deploy using the custom image.

    If this helps kindly accept the answer thanks much.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.