a

    Andy

    1 year ago
    prefect server start
    throws an error for me. I think it’s because docker is on root. However, I can’t run
    sudo !!
    — I get
    sudo: prefect: command not found
    . Is there a way to resolve this issue?
    Michael Adkins

    Michael Adkins

    1 year ago
    Hey @Andy -- your python packages are probably installed for your user and not your admin so
    sudo
    is missing a prefect installation. You can output a docker-compose with
    prefect server config
    instead then use
    sudo docker-compose up
    to start the server. Alternatively, you can extend the PYTHONPATH for your admin user to include your user-installed python packages.
    ❯ which prefect       
    /opt/homebrew/Caskroom/miniconda/base/envs/prefect-dev-38/bin/prefect
    
    ❯ export PATH="/opt/homebrew/Caskroom/miniconda/base/envs/prefect-dev-38/bin:$PATH"
    might work -- but it may have issues finding the python library
    a

    Andy

    1 year ago
    Thanks @Michael Adkins Running
    sudo docker-compose -f … up
    from the config works! Adding to path does not work (and might conflict with other envs?)
    Michael Adkins

    Michael Adkins

    1 year ago
    Glad that's a viable workaround. Yeah a path based approach would be tricky. You could try using the full path i.e.
    /opt/homebrew/Caskroom/miniconda/base/envs/prefect-dev-38/bin/prefect server start
    I guess but it does seem like that would have python env conflicts still.