https://prefect.io logo
#prefect-server
Title
# prefect-server
d

Dana Merrick

03/04/2021, 8:35 PM
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:
Copy code
Error: No such command 'execute'.
Any idea what I am missing? I installed prefect via conda btw
z

Zanie

03/04/2021, 8:40 PM
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

03/04/2021, 8:49 PM
Copy code
Error: No such command 'diagnostics'.
if i run it without args:
Copy code
# 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.
z

Zanie

03/04/2021, 8:51 PM
pip show prefect
It looks like you're on a really old version perhaps?
d

Dana Merrick

03/04/2021, 8:52 PM
Copy code
# 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:
z

Zanie

03/04/2021, 8:52 PM
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

03/04/2021, 8:55 PM
ah yeah looks like its an ancient version of prefect
Copy code
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
tyvm
z

Zanie

03/04/2021, 8:58 PM
👍 sweet
2 Views