m

    Maggie Walker

    3 weeks ago
    Hey! I'm trying to run the python demo locally - and hitting issues during
    ./pw demo
    -- specifically I get stuck in
    pw
    on
    env_builder.create(venv_dir)
    the error comes from here
    /Users/walk003/orchard/collab/mwalker/cerbos/demo-python/.pyprojectx/pyprojectx/0.9.9-py3.8/bin/python3 -Im ensurepip --upgrade --default-pip
    and I get
    zsh: killed      -Im ensurepip --upgrade --default-pip
    I'm working in a new M1 macbook, and I've heard there's funkiness with python/pip + M1 -- have you all encountered anything similar?
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    Hi. Are there any error messages or log lines before it gets killed?
    m

    Maggie Walker

    3 weeks ago
    not that I've found so far
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    And, you're trying to run https://github.com/cerbos/python-cognito-cerbos, right?
    m

    Maggie Walker

    3 weeks ago
    but if the one you sent is better, I'm happy to try that!
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    Ah no. That's OK. I forgot that demo-python used
    pw
    as well. Let me investigate a bit more and get back to you.
    m

    Maggie Walker

    3 weeks ago
    Thanks!
    in the meantime I'm going to try the ole "delete it all and start from scratch" just to be sure
    upon re-trying, I'm getting a different error I had gotten previously:
    Referenced from: '/Users/walk003/orchard/collab/mwalker/cerbos/demo-python/.pyprojectx/pyprojectx/0.9.9-py3.8/bin/python3'
      Reason: tried: '/Users/walk003/orchard/collab/mwalker/cerbos/demo-python/.pyprojectx/pyprojectx/0.9.9-py3.8/bin/../Python3' (no such file), '/usr/local/lib/Python3' (no such file), '/usr/lib/Python3' (no such file)
    zsh: abort       -Im ensurepip --upgrade --default-pip
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    Are you using Python installed from Homebrew?
    m

    Maggie Walker

    3 weeks ago
    pyenv
    pyenv versions 
    * system (set by /Users/walk003/.pyenv/version)
      3.8.13
      3.10.0
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    Ah, maybe the
    pw
    script is getting confused by that. It's mainly a wrapper for setting up an isolated Python environment. You already have one from Pyenv from the sound of it. Do you have the
    pdm
    build tool installed? If so, you can just do
    pdm run python main.py
    m

    Maggie Walker

    3 weeks ago
    I see I see. I don't have pdm at the moment, but not against trying it out
    let me brew install pdm and see if
    pdm run python main.py
    works
    File "/Users/walk003/orchard/collab/mwalker/cerbos/demo-python/main.py", line 7, in <module>
        import emoji
    ModuleNotFoundError: No module named 'emoji'
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    Do
    pdm install
    m

    Maggie Walker

    3 weeks ago
    thereee are my dependencies 🙏
    cool, it's working now!
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    Awesome!
    m

    Maggie Walker

    3 weeks ago
    Thanks so much!
    Charith (Cerbos)

    Charith (Cerbos)

    3 weeks ago
    You're welcome