Hi Guys, I'm encountering an issue while trying t...
# ask-community
v
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
Hi Vijay! What are you looking to do through the CLI. Start a new server? Or run a script?
v
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
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
prefect <insert cmd here>
ie:
prefect server start
,
prefect worker start
,
prefect profile inspect
etc.