You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve encountered anomalies while installing and using PromptFlow in Docker containers with different Python versions. According to the PromptFlow installation documentation, the Python environment should support python>=3.9,<4.0. However, the only configuration where PromptFlow works correctly is with python:3.8 (specifically python:3.8-slim docker base image).
Observations:
1. Docker Setup:
Dockerfile:
FROM python:3.8-slim
WORKDIR /app
COPY . .
RUN apt-get update && apt-get install -y build-essential
RUN pip install -r requirements.txt
CMD ["/bin/sh", "-c", "bash"]
requirements.txt:
promptflow
promptflow-tools
2. Behavior:
Using the Docker image python:3.8-slim, PromptFlow version 1.16.2 installs and runs fine.
With python:3.9-slim-bullseye or python:3.11-slim-bullseye, PromptFlow version 1.17.0 installs without errors, but the following issue occurs when invoking pf:
# pf -v
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/promptflow/__init__.py", line 17, in <module>
from promptflow._sdk._load_functions import load_flow as _load_flow
...
ImportError: cannot import name '_T' from 'marshmallow.fields' (/usr/local/lib/python3.9/site-packages/marshmallow/fields.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/pf", line 5, in <module>
from promptflow._cli.pf import main
...
Exception: Promptflow may not installed correctly. If you are upgrading from 'promptflow<1.8.0' to 'promptflow>=1.8.0', please run 'pip uninstall -y promptflow promptflow-core promptflow-devkit promptflow-azure', then 'pip install promptflow>=1.8.0'. Reach https://microsoft.github.io/promptflow/how-to-guides/faq.html#promptflow-1-8-0-upgrade-guide for more information.
3. Pip Inspection:
Despite the error, pip show -f promptflow indicates a normal installation of PromptFlow version 1.17.0. As shown below:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description:
I’ve encountered anomalies while installing and using PromptFlow in Docker containers with different Python versions. According to the PromptFlow installation documentation, the Python environment should support python>=3.9,<4.0. However, the only configuration where PromptFlow works correctly is with python:3.8 (specifically python:3.8-slim docker base image).
Observations:
1. Docker Setup:
2. Behavior:
3. Pip Inspection:
Despite the error, pip show -f promptflow indicates a normal installation of PromptFlow version 1.17.0. As shown below:
4. Additional Logs:
Attached are the logs from the Docker build process for these images:
Questions:
Current Status:
We’re still blocked on this issue, and waiting for a solution.
build_3.8.log
build_3.9.log
build_3.11.log
Beta Was this translation helpful? Give feedback.
All reactions