l

    Luan Carvalho

    2 years ago
    Hi guys im trying to install prefect, but all times this error appears. Whats the most easy way to install prefect ? Thanks
    /home/luan/anaconda3/lib/python3.7/site-packages/prefect/cli/server.py:236: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read <https://msg.pyyaml.org/load> for full details.
    y = yaml.load(file)
    `ERROR: Couldn't connect to Docker daemon - you might need to run
    docker-machine start default
    .`
    Exception caught; killing services (press ctrl-C to force)
    `ERROR: Couldn't connect to Docker daemon - you might need to run
    docker-machine start default
    .`
    Traceback (most recent call last):
    File "/home/luan/anaconda3/lib/python3.7/site-packages/prefect/cli/server.py", line 291, in start
    ["docker-compose", "pull"], cwd=compose_dir_path, env=env
    File "/home/luan/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['docker-compose', 'pull']' returned non-zero exit status 1.
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "/home/luan/anaconda3/bin/prefect", line 10, in <module>
    sys.exit(cli())
    File "/home/luan/anaconda3/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
    File "/home/luan/anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
    File "/home/luan/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/luan/anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/luan/anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/home/luan/anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
    File "/home/luan/anaconda3/lib/python3.7/site-packages/prefect/cli/server.py", line 307, in start
    ["docker-compose", "down"], cwd=compose_dir_path, env=env
    File "/home/luan/anaconda3/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
    File "/home/luan/anaconda3/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['docker-compose', 'down']' returned non-zero exit status 1.
    nicholas

    nicholas

    2 years ago
    Hi @Luan Carvalho - it appears you can't connect to the Docker daemon, do you have Docker running and does your user have access to it?
    l

    Luan Carvalho

    2 years ago
    @nicholas Yes, my docker its running I dont know why he cannot access
    nicholas

    nicholas

    2 years ago
    Ah ok! Which OS are you on?
    l

    Luan Carvalho

    2 years ago
    Ubuntu
    nicholas

    nicholas

    2 years ago
    Got it - have you created the
    docker
    group and added your user to it? If not you'll need to run:
    sudo groupadd docker
    then
    sudo usermod -aG docker $(whoami)
    and then log out/log back in and run
    sudo service docker restart