<@ULVA73B9P> I have set up a prefect server on an ...
# ask-marvin
b
@Marvin I have set up a prefect server on an on prem kubernetes cluster. When I try to run a deployment, I get the following error: ModuleNotFoundError: No module named ‘prefect deployments.steps’; ‘prefect.deployments’ is not a package Why am I getting this error and how can I fix it?
m
Ah, it seems like we're dealing with a classic case of a missing module. This error typically arises when the required package is not installed in your container. As suggested in one of the Prefect Discourse threads, you might want to include the necessary installation in your Dockerfile, like so:
Copy code
dockerfile
RUN pip install prefect-aws
Alternatively, you can use the
EXTRA_PIP_PACKAGES
environment variable to install additional packages. Another point to consider is the location of your flow files. If Prefect can't find the code to run, it will throw a
FileNotFoundError
. Make sure your
prefect.yaml
file is correctly configured and your flow files are in the expected directory. You can find more about this in another Prefect Discourse thread. Lastly, it's worth noting that the
prefect.deployments
module doesn't seem to exist in the Prefect source code, which might be the root cause of the
ModuleNotFoundError
. You might want to double-check your code for any typos or incorrect module references. Remember, the path to code enlightenment is often paved with documentation and error messages. Happy debugging!
n
i would imagine you have an old version of prefect where
prefect.projects
has not yet been replaced by
prefect.deployments
that changed in
2.10.14