Has anyone run into this issue when trying to run ...
# prefect-community
m
Has anyone run into this issue when trying to run
flow.visualize()
? I installed the viz package with
pip install prefect[viz]
but am still getting this:
Copy code
Traceback (most recent call last):
  File "insurance_export.py", line 184, in <module>
    flow.visualize()
  File "/home/ec2-user/anaconda3/envs/python38_prefect/lib/python3.8/site-packages/prefect/core/flow.py", line 1406, in visualize
    graph.render(tmp.name, view=True)
  File "/home/ec2-user/anaconda3/envs/python38_prefect/lib/python3.8/site-packages/graphviz/files.py", line 216, in render
    self._view(rendered, self._format, quiet_view)
  File "/home/ec2-user/anaconda3/envs/python38_prefect/lib/python3.8/site-packages/graphviz/files.py", line 262, in _view
    view_method(filepath, quiet)
  File "/home/ec2-user/anaconda3/envs/python38_prefect/lib/python3.8/site-packages/graphviz/backend.py", line 323, in view_unixoid
    popen_func(cmd)
  File "/home/ec2-user/anaconda3/envs/python38_prefect/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/ec2-user/anaconda3/envs/python38_prefect/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'xdg-open'
a
try installing it
Copy code
sudo apt-get --reinstall xdg-utils
ohh you’re on Amazon Linux… try with
yum install xdg-utils
maybe
m
that doesnt seem to work @Avi A 😞
Copy code
(python38_prefect) sh-4.2$ sudo yum install xdg-utils
Loaded plugins: dkms-build-requires, priorities, update-motd, upgrade-helper, versionlock
amzn-main                                                                                                                                   | 2.1 kB  00:00:00     
amzn-updates                                                                                                                                | 3.8 kB  00:00:00     
No package xdg-utils available.
Error: Nothing to do
z
You may need to contact AWS support about the best way to install xdg-utils on Amazon Linux, from a quick search it looks like you’d need to add external repos.
m
ok thanks. appreciate it
z
It’s also feasible it’s in the EPEL repo that they provide access to