Ido Slonimsky
12/13/2021, 2:51 PMflow.register(project_name="test-project")
What is the best practice to importing common .py files? Since at the moment the simple
from utils import util
fails with an error:
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named 'utils'")
Anna Geller
Anna Geller
Ido Slonimsky
12/13/2021, 2:57 PMSean Talia
12/13/2021, 3:58 PMSean Talia
12/13/2021, 4:09 PMFROM
clause, and then install their additional dependencies via a requirements.txt
after that.
I know this is a common issue in Python development, but how does Prefect recommend go about managing differing base dependencies between prefect and additional packages that a developer is trying to introduce? e.g. I want to install the latest version of paramiko
, which by default uses newer versions of cryptography
, pynacl
, etc. than the version of prefect I'm running does. Right now, we're just blindly installing these additional modules, and if things work out and there are no conflicts, then great; but I'm certain there will come a day when there are actually some conflicting dependencies, and we'll probably need to introduce some kind of pre-hook at uses something like pip-tools
to install newer dependencies while constraining some installed package versions (based on what's already installed in the official prefect images)Sean Talia
12/13/2021, 4:12 PMAnna Geller
--no-update-dependencies
 or --no-update-deps
 to conda install
 command. Ex: conda install --no-update-deps paramiko
.
In pip it would be:
pip install --no-deps paramiko
Sean Talia
12/13/2021, 5:39 PM