, but when I try to run my flow i get `ImportError: Using
prefect.tasks.kubernetes
requires Prefect to be installed with the "kubernetes" extra.` . I also tried directly from source, cloning the git repo and running
pip install "./prefect[kubernetes]"
but I get the same result...
k
Kevin Kho
06/28/2021, 4:43 PM
Hi @thebuleon29, I just tried this in a new environment and it installs correctly. What agent are you using? Local? Are you running the agent from the same Python environment?
t
thebuleon29
06/29/2021, 8:18 AM
Hi, I am not using an agent, just the
prefect run
command (
prefect run -p ./k8s_flow.py
). I can run other flows this way, even without the agent.
Even when I try to launch the server and run the agent I get the same error when running
prefect register --project test -p ./k8s_flow.py
.
thebuleon29
06/29/2021, 8:28 AM
I don't think that it changes anything, but I still should precise that I am running Prefect in a Docker container.
thebuleon29
06/29/2021, 8:57 AM
It also sends this error:
ImportError: cannot import name 'client' from partially initialized module 'kubernetes' (most likely due to a circular import) (/usr/prefect/dags/kubernetes.py)
.
I import like this:
from prefect.tasks.kubernetes.job import RunNamespacedJob
.
thebuleon29
06/29/2021, 9:04 AM
Ok sorry, that one is on me. There was another file in the directory called 'kubernetes.py' that was causing the error. It had nothing to do with Prefect.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.