https://flyte.org logo
#announcements
Title
# announcements
r

Raviraja Ganta

04/21/2022, 8:00 PM
I am trying the example present in documentation. Getting the following error
Copy code
(flyte)  raviraja@ip-192-168-124-8  ~/Desktop/flows/flyte_flows    pyflyte run example.py:wf --n 500 --mean 42 --sigma 2

Usage: pyflyte [OPTIONS] COMMAND [ARGS]...
Try 'pyflyte --help' for help.

Error: No such command 'run'.
Copy code
(flyte)  raviraja@ip-192-168-124-8  ~/Desktop/flows/flyte_flows    pyflyte --help
Usage: pyflyte [OPTIONS] COMMAND [ARGS]...

  Entrypoint for all the user commands.

Options:
  -c, --config TEXT       Path to config file for use within container
  -k, --pkgs TEXT         Dot separated python packages to operate on.
                          Multiple may be specified  Please note that this
                          option will override the option specified in the
                          configuration file, or environment variable
  -i, --insecure BOOLEAN  Disable SSL when connecting to Flyte backend.
  --help                  Show this message and exit.

Commands:
  init         Create flyte-ready projects.
  local-cache  Interact with the local cache.
  package      This command produces a Flyte backend registrable package...
  serialize    This command produces protobufs for tasks and templates.
run
is not available. Am I missing something? When running normally with
python example.py
it is working fine. I have installed
flytekit==0.32.6
this version.
g

Greg Gydush

04/21/2022, 8:10 PM
I just checked my install, and
run
appears to be there! Check
pip freeze
?
y

Yee

04/21/2022, 8:14 PM
yeah can you
pip show flytekit
?
that’s very weird
r

Raviraja Ganta

04/21/2022, 8:15 PM
Copy code
(flyte)  ✘ raviraja@ip-192-168-124-8  ~/Desktop/python-monorepo/taxonomy/taxonomy/flows/flyte_flows    pip show flytekit
Name: flytekit
Version: 0.32.6
Summary: Flyte SDK for Python
Home-page: <https://github.com/flyteorg/flytekit>
Author:
Author-email:
License: apache2
Location: /opt/miniconda3/envs/flyte/lib/python3.8/site-packages
Requires: checksumdir, click, cloudpickle, cookiecutter, croniter, dataclasses-json, deprecated, diskcache, docker-image-py, docstring-parser, flyteidl, grpcio, grpcio-status, keyring, marshmallow-jsonschema, natsort, pandas, protobuf, pyarrow, python-dateutil, python-json-logger, pytimeparse, pytz, pyyaml, requests, responses, retry, sortedcontainers, statsd, typing-extensions, urllib3, wheel, wrapt
Required-by:
Can you install once using pip instead of local repo
@Greg Gydush @Yee any leads?
g

Greg Gydush

04/21/2022, 8:35 PM
Interesting - I installed with
poetry
which uses
pip
but can try in a fresh container
👍 1
Hmmm interesting. can you do
which pyflyte
- oddly, when I installed with
pip
I don’t get a pyflyte command 🙃
Copy code
dev@17546bca2a64:/usr/src/app$ pip show flytekit
Name: flytekit
Version: 0.32.6
Summary: Flyte SDK for Python
Home-page: <https://github.com/flyteorg/flytekit>
Author: 
Author-email: 
License: apache2
Location: /home/dev/.local/lib/python3.9/site-packages
Requires: pyarrow, natsort, diskcache, keyring, dataclasses-json, typing-extensions, cookiecutter, pytimeparse, croniter, responses, flyteidl, docstring-parser, cloudpickle, pyyaml, statsd, wheel, python-json-logger, requests, pytz, deprecated, python-dateutil, sortedcontainers, checksumdir, urllib3, pandas, click, docker-image-py, grpcio-status, protobuf, wrapt, grpcio, marshmallow-jsonschema, retry
Required-by: 
dev@17546bca2a64:/usr/src/app$ pyflyte --help
bash: pyflyte: command not found
y

Yee

04/21/2022, 8:39 PM
can you
which python
also can you
ipython
and then
import flytekit; flytekit.__file__
g

Greg Gydush

04/21/2022, 8:40 PM
I’m in a container.
Copy code
dev@17546bca2a64:/usr/src/app$ which python
/fn/bin/python
dev@17546bca2a64:/usr/src/app$ python
Python 3.9.10 (main, Apr  7 2022, 15:43:32) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import flytekit
>>> flytekit.__file__
'/home/dev/.local/lib/python3.9/site-packages/flytekit/__init__.py'
Run is there 🤦 - the above error was my bad (.local not in $PATH)
Copy code
dev@17546bca2a64:/usr/src/app$ /home/dev/.local/bin/pyflyte --help
Usage: pyflyte [OPTIONS] COMMAND [ARGS]...

  Entrypoint for all the user commands.

Options:
  -k, --pkgs TEXT    Dot separated python packages to operate on.  Multiple
                     may be specified  Please note that this option will
                     override the option specified in the configuration file,
                     or environment variable
  -c, --config TEXT  Path to config file for use within container
  --help             Show this message and exit.

Commands:
  init         Create flyte-ready projects.
  local-cache  Interact with the local cache.
  package      This command produces a Flyte backend registrable package...
  run          Run command, a.k.a.
  serialize    This command produces protobufs for tasks and templates.
r

Raviraja Ganta

04/21/2022, 8:43 PM
I am using conda virtualenv.. does that make a problem?
g

Greg Gydush

04/21/2022, 8:43 PM
It shouldn’t - do
which pyflyte
and
which python
tho - I’m curious where it’s installed
r

Raviraja Ganta

04/21/2022, 8:48 PM
message has been deleted
Resolved it. I tried uninstalling and then installing with
--no-cache-dir
option in pip. Then it worked
🎉 1
82 Views