I am having an issue where a deployment is not see...
# ask-community
j
I am having an issue where a deployment is not seeing pip packages defined in the python env of the codebase. Everything works fine when just running the flow directly, or if I do not encapsulate in a python environment...however, if I apply the deployment, when it's run, I will get a package not found error. Is there a way to get prefect to see the environment where my packages are installed?
Copy code
@flow(name="extract_and_write")
def extract_and_write(playlist_id):    
    playlist_tracks = get_playlist_tracks(playlist_id)
    # fill in remainder of flow here
    selected_tracks = extract_tracks_info(playlist_tracks, playlist_id)
    write_to_csv(selected_tracks)

deployment = Deployment.build_from_flow(
        name="sample_deployment",
        flow=extract_and_write,
        version=1,
        schedule=schedule,
        is_schedule_active=True,
        work_queue_name="default",
        parameters=parameters,
        entrypoint="./spotify_workflow.py:extract_and_write",
    )