It is possible to run the agent in 2.0 in a python...
# prefect-community
It is possible to run the agent in 2.0 in a python file instead of doing
prefect agent start  --work-queue blabla
We currently don’t support that. Is there a reason that you want to run the agent in a Python file?
I am able to set supervisor to run the agent properly but then when i trigger flows in the UI it is not using the virtual environment and it is using the global python runtime.
That is not the expected behavior. Are you using virtualenv?
Copy code
/home/ubuntu/project/env/bin/prefect agent start --work-queue "my queue"
this is qhat i have in the supervisor file
and i don't wan to install al the dependencies globally to make it work
i added environment=PATH=... and it seems to work now. the whole reason why i was asking about python agent execution instead of bash was because with prefect 1.0 ive never had to worry about those environments i just executed the python file with the right path to the environment and that was it
thanks for the help
I’m curious which infrastructure you are using?