Hey everyone :wave: I am trying to install a pip p...
# ask-community
j
Hey everyone đź‘‹ I am trying to install a pip package using the
EXTRA_PIP_PACKAGES
in a deployment (located in a prefect.yaml file). I am following this, but I run into this error when trying to deploy:
Copy code
Only a single block placeholder is allowed in a string and no surrounding text is allowed.
n
hi @John Mizerany - i think you’ll want to: • Make EXTRA_PIP_PACKAGES all caps (not totally sure that matters but i think it does) • make the value a space delimited string “foo bar” not a yaml list
j
@Nate Gotcha, yeah
EXTRA_PIP_PACKAGES
is all caps So in the
deployments
section of the
prefect.yaml
file I can just do this?
Copy code
job_variables:
        env:
          EXTRA_PIP_PACKAGES: 
          - prefect-snowflake 
          - prefect-shell
n
Copy code
job_variables:
        env:
          EXTRA_PIP_PACKAGES: "prefect-snowflake prefect-shell git+<https://github.com/me/myrepo.git>"
j
Okay gotcha, that is what I am currently doing and that’s what my error is coming from
n
hmm can you show all your deployment's yaml?
like not your whole file, just for that deployment
j
Just for context, I have it like this
Copy code
job_variables:
        env:
          EXTRA_PIP_PACKAGES: "prefect-snowflake prefect-shell git+https://{{prefect.blocks.secret.secret-block-name}}<http://github.com/me/myrepo.git|github.com/me/myrepo.git>"
n
hmm
j
I am passing in a github access token since it’s a private repo, but also don’t want it stored visibly inside prefect / version control. i figured the brackets are probably throwing it off
n
interesting, yeah i'd suspect the same. as a short term workaround I'd be inclined to that install separately in a pull step i can look more into this later today
j
Thanks! I’ll try a few more things, but just lmk if you find anything
Also just more context, I left it out of the deployment and then manually added it in prefect cloud. It was registered as a valid json but when the flow starts I get that same error
Hey @Nate đź‘‹ did you find anymore details about the above issue?
n
hi @John Mizerany - sorry i havent had time if you go to the configuration tab on your deployment, what do you see for your
env
here?
j
No worries! Let me check
@Nate Here it is
Copy code
{
  "env": {
    "EXTRA_PIP_PACKAGES": "prefect-snowflake prefect-shell git+https://'{{prefect.blocks.secret.example-secret-block}}'@github.com/example-repo"
  },
}