Thread
#prefect-server
    d

    Dana Merrick

    1 year ago
    i'm trying to execute flow on a k8s agent using a custom image... i have
    prefect
    installed on the custom image, but when the container starts up and tries to run
    prefect execute flow-run
    , I get this error:
    Error: No such command 'execute'.
    Any idea what I am missing? I installed prefect via conda btw
    Michael Adkins

    Michael Adkins

    1 year ago
    Hi @Dana Merrick That's a weird one for sure. If you launch your custom image as a local container and run
    prefect diagnostics
    and
    prefect execute
    what happens?
    d

    Dana Merrick

    1 year ago
    Error: No such command 'diagnostics'.
    if i run it without args:
    # prefect
    Usage: prefect [OPTIONS] COMMAND [ARGS]...
    
      The Prefect CLI
    
    Options:
      --help  Show this message and exit.
    
    Commands:
      create-environment  Call the setup and execute functions for a given...
      make-user-config    Generates a user configuration file
      run                 Run a flow from an environment file.
    Michael Adkins

    Michael Adkins

    1 year ago
    pip show prefect
    It looks like you're on a really old version perhaps?
    d

    Dana Merrick

    1 year ago
    # pip show prefect
    Name: prefect
    Version: 0.14.11
    Summary: The Prefect Core automation and scheduling engine.
    Home-page: <https://www.github.com/PrefectHQ/prefect>
    Author: Prefect Technologies, Inc.
    Author-email: <mailto:help@prefect.io|help@prefect.io>
    License: Apache License 2.0
    Location: /miniconda/lib/python3.8/site-packages
    Requires: pyyaml, pendulum, pytz, marshmallow, urllib3, requests, cloudpickle, tabulate, msgpack, dask, python-box, python-dateutil, click, distributed, mypy-extensions, marshmallow-oneofschema, toml, croniter, python-slugify, docker
    Required-by:
    Michael Adkins

    Michael Adkins

    1 year ago
    Is it possible you have two versions of prefect installed?
    find / --name "prefect"
    which prefect
    prefect version
    or
    python -c "import prefect; print(prefect.__version__)"
    d

    Dana Merrick

    1 year ago
    ah yeah looks like its an ancient version of prefect
    root@a8d8f2241072:/reverie# python -c "import prefect; print(prefect.__version__)"
    0.14.11
    root@a8d8f2241072:/reverie# source activate reverie_env
    (reverie_env) root@a8d8f2241072:/reverie# python -c "import prefect; print(prefect.__version__)"
    0.5.0
    the former is probably from a manual
    pip install
    (during testing)
    ill pin the version in conda to 0.14.11
    Michael Adkins

    Michael Adkins

    1 year ago
    👍 sweet
    d

    Dana Merrick

    1 year ago
    tyvm