Where does prefect decide which packages to instal...
# prefect-community
e
Where does prefect decide which packages to install?
👍 1
e
Does it work with
pyproject.toml
?
c
My understanding is that
pyproject.toml
supplants
setup.py
, which currently our repository is not configured for
If you want to open an issue for a feature enhancement on this, I’m sure it can be reviewed
e
Ye it keeps everything nicely in one file, I will open a feature enhancement
Found this issue, could you add the feature enhancement label to it please?
z
Sorry I’m confused about how the internal file we are using affects your usage
You can use Prefect with a
pyproject.toml
even though we are not using one for development ourselves.
e
Oh I got the two mixed up, how do I tell prefect to install from my
pyproject.toml
my kubernetes deployment is erroring on package not found?
z
The most common pattern is to create an image based on the Prefect image with your project installed.
e
When specifying that image I create in my
kubernetes-job
block here, will it be looking on docker hub, so something like 'eddywd/prefect_pandas'?
z
You could push it to DockerHub or make it available on a registry on Kubernetes / GCP / etc. depending on your infrastructure.
e
My
pyproject.toml
was created to work with poetry and so has this in the build systems:
Copy code
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Does that need to be changed to setup tools:
Copy code
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
to match the base prefect image?
z
The Prefect base image doesn’t care what tool you’re using to build your project
🙏 1
We don’t use a virtual environment though, so you’ll probably want to ensure Poetry does not attempt to install into one.
e
Great thanks