Jonathan Samples
02/03/2025, 7:30 PM19:27:36.656 | INFO | prefect.flow_runs.runner - Opening process...
/usr/local/bin/python3.12: No module named prefect.engine
19:27:36.671 | ERROR | prefect.flow_runs.runner - Process for flow run 'petite-snail' exited with status code: 1
19:27:36.701 | INFO | Flow run 'petite-snail' - Downloading flow code from storage at '.'
I'm perfectly able to run our flows in a process
worker or by invoking the flows directly through python. Anyone have any ideas?Jake Kaplan
02/03/2025, 9:52 PMprefect flow-run execute
to launch a Runner
. That Runner
will then launch your flow in a child process with python -m prefect.engine
it looks like prefect
is installed for the first part of that but not the second partJonathan Samples
02/03/2025, 9:53 PMJonathan Samples
02/03/2025, 9:53 PMJonathan Samples
02/03/2025, 9:56 PMpython -m prefect.engine
I get that same error. Any ideas?Jake Kaplan
02/03/2025, 9:57 PMJonathan Samples
02/03/2025, 9:57 PM/opt/prefect/project
Jake Kaplan
02/03/2025, 9:57 PMJake Kaplan
02/03/2025, 9:58 PMprefect version
as well?Jonathan Samples
02/03/2025, 9:58 PMJonathan Samples
02/03/2025, 9:58 PMVersion: 3.0.11
API version: 0.8.4
Python version: 3.12.7
Git commit: a17ccfcf
Built: Thu, Oct 24, 2024 5:36 PM
OS/Arch: linux/aarch64
Profile: ephemeral
Server type: server
Pydantic version: 2.9.2
Jake Kaplan
02/03/2025, 10:03 PMprefect version
and python -m prefect.engine
both locally on your machine (not inside of a docker container) and python -m prefect.engine
gives an error and prefect version
gives the above output.
Also when using an ecs
worker and work pool, the container exits with the original error you pasted.
Do I have that right?Jonathan Samples
02/03/2025, 10:03 PMJonathan Samples
02/03/2025, 10:03 PMJake Kaplan
02/03/2025, 10:06 PMprefect:3-latest
?Jonathan Samples
02/03/2025, 10:06 PMJake Kaplan
02/03/2025, 10:07 PM3.1.15
Jake Kaplan
02/03/2025, 10:07 PMJonathan Samples
02/03/2025, 10:08 PMJonathan Samples
02/03/2025, 10:11 PMJake Kaplan
02/03/2025, 10:32 PMprefect
somewhere a subprocess couldn't access it?
The 2nd process that gets runs works like:
command = [sys.executable, "-m", "prefect.engine"]
Jonathan Samples
02/03/2025, 10:33 PMJake Kaplan
02/03/2025, 10:34 PMJonathan Samples
02/03/2025, 10:34 PMJake Kaplan
02/03/2025, 10:34 PMJonathan Samples
02/03/2025, 10:35 PMJake Kaplan
02/03/2025, 10:39 PMfrom prefect import ...
at the top of that file?Jonathan Samples
02/03/2025, 10:39 PMJake Kaplan
02/03/2025, 10:40 PMJake Kaplan
02/03/2025, 10:40 PMpython -c "from prefect import engine"
Jonathan Samples
02/03/2025, 10:41 PMcannot import name 'engine' from 'prefect'
Jake Kaplan
02/03/2025, 10:42 PMprefect
or engine
?Jonathan Samples
02/03/2025, 10:43 PMJake Kaplan
02/03/2025, 10:43 PMJake Kaplan
02/03/2025, 10:43 PMJonathan Samples
02/03/2025, 10:44 PMJonathan Samples
02/03/2025, 10:44 PMJonathan Samples
02/03/2025, 10:44 PMJonathan Samples
02/03/2025, 10:45 PMJake Kaplan
02/03/2025, 10:45 PM