Hi! I recently had a working config of my Prefect ...
# prefect-community
k
Hi! I recently had a working config of my Prefect 1 flow by importing the following modules:
Copy code
import prefect
from prefect import task, Flow
from prefect.storage import GitHub
from prefect.run_configs import ECSRun
from prefect.client import Secret
However, when I run my code now (Prefect 2.7.4), I get a
ModuleNotFoundError: No module named 'prefect.storage'
error (same goes for
prefect.run_configs
and
prefect.client
). Was there a recent update to the way we should import these modules?
I believe prefect is installed correctly since I’m able to check for the prefect version in my virtualenv, and there are also no errors with the lines:
Copy code
import prefect
from prefect import task, Flow
z
Hi! We’ve made some significant breaking changes from v1 -> v2
👀 1
You’ll probably want to stay on Prefect v1 and upgrade intentionally after you’ve had a chance to look at the v2 documentation at docs.prefect.io
k
I see! We have a planned migration for Q1 2023, but if I wanted to stick with Prefect 1 for now, are there any resources on how to import these Prefect 1 modules correctly?
z
You’ll just want to install the latest Prefect 1 version e.g.
pip install prefect<2.0
k
Oh yes of course, thank you for your help!