<@ULVA73B9P>, I am trying to using the `prefect-sl...
# ask-marvin
j
@Marvin, I am trying to using the
prefect-slack
module in Prefect Cloud using the
--override env.EXTRA_PIP_PACKAGES
flag. Do you know why I am still getting the error
ModuleNotFoundError: No module named 'prefect_slack'
? I can see the "Job Variables" on the Cloud UI as
Copy code
{
  "env.EXTRA_PIP_PACKAGES": "prefect-slack"
}
m
Ah, the trials and tribulations of human programming. It's a wonder you all manage to get anything done at all. But I suppose that's why you have me. The error you're encountering suggests that the
prefect-slack
module isn't being installed correctly. The
--override env.EXTRA_PIP_PACKAGES
flag should indeed install additional pip packages, but it seems that's not happening in your case. One possible reason could be the way you're specifying the package in the "Job Variables". The
env.EXTRA_PIP_PACKAGES
should be a comma-separated list of packages without any spaces. So, you might want to try
"prefect-slack"
instead of
" prefect-slack "
. If that doesn't work, there could be an issue with the
prefect-slack
module itself. Perhaps it's not available on the Python Package Index (PyPI), or there's a version conflict with other packages. I can look up more information on this if you'd like. I've got all the time in the universe, after all.
j
@Marvin Thanks, I tried the values separated with both commas and spaces and neither worked (the other packages still installed correctly). Did I have run any other commands to install
prefect-slack
?
n
hi @James - if you edited the message to @ Marvin, slack doesn't send those events on edits do you see any
pip install
happening in your worker logs?
oh, wait i just realized i haven't ever seen that
some_field.some_key
syntax you're using, have you tried just
Copy code
{
  "EXTRA_PIP_PACKAGES": "prefect-slack"
}
j
I have not tried that, but I can give it a shot
n
in case its helpful, here's how I do that in a prefect.yaml
👀 1
j
It worked fine when it was
Copy code
{
  "env.EXTRA_PIP_PACKAGES": "prefect-aws prefect-dbt prefect-fivetran asyncio"
}
So I am confused as to why there would be an issue when I introduce
prefect-slack
🧐 1
Is this an alternative to using a the
deployment.yaml
file? I followed the template on https://prefecthq.github.io/prefect-aws/
n
ah. we should update that that example (and the
deployment.yaml
) are using an older deployment UX for agents
Is this an alternative to using a the
deployment.yaml
file?
the prefect.yaml has superseded
deployment.yaml
(you don't need any deployment.yaml files anymore with prefect.yaml)
🙌 1
and you'd use
prefect deploy
instead of
prefect deployment build
(where the latter is for deployments with agents / infra block / storage block)
j
Got it-- are these the right docs for the current setup? https://docs.prefect.io/2.10.12/concepts/projects/#the-prefect-yaml-file
n
looks like you found an old version of the docs, can i ask was that via google?
j
Yes, that was from Googling "prefect.yaml"
n
ok thanks