Hi Guys,
I'm encountering an issue while trying to use Prefect through CLI. When I am running the following command:
Copy code
python3 -m prefect
I am getting this error:
Copy code
/path/to/python3.10: No module named prefect.__main__; 'prefect' is a package and cannot be directly executed
and I am using Python version 3. If I am trying to perform the same thing in prefect version 1, then I can see the output.
b
Bianca Hoch
01/22/2025, 3:56 PM
Hi Vijay! What are you looking to do through the CLI. Start a new server? Or run a script?
v
Vijay Purbia
01/23/2025, 6:16 AM
Hi Bianca, I am trying to start a worker in a docker container using
prefect worker start
. Previously I was using Prefect version 1 to run the Agent and it was working fine with the same envirnoment. After upgrading to Prefect version 3, it is throwing this error. I have checked, and Prefect is installed properly.
b
Bianca Hoch
01/23/2025, 10:00 PM
Are you still seeing the same behavior if you run just
prefect worker start
?
I think running
python3 -m prefect
will throw an error because you're trying to directly execute the Prefect package.
If you have prefect installed, you should be able to just use
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.