Closed Bug 1908680 Opened 1 year ago Closed 1 year ago

"macOS MozPhab Installation Guide" instructions don't work

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1876182

People

(Reporter: mccr8, Unassigned)

Details

I tried installing MozPhab using the instructions on this page: https://moz-conduit.readthedocs.io/en/latest/mozphab-macos.html

When I try to run pip3 install MozPhab, I get the error error: externally-managed-environment, and a long explanatory error message. I tried running brew install MozPhab but it did not recognize that.

Blocks: mach-busted

Here's the full error message:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a Python library that isn't in Homebrew,
    use a virtual environment:

    python3 -m venv path/to/venv
    source path/to/venv/bin/activate
    python3 -m pip install xyz

    If you wish to install a Python application that isn't in Homebrew,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. You can install pipx with

    brew install pipx

    You may restore the old behavior of pip by passing
    the '--break-system-packages' flag to pip, or by adding
    'break-system-packages = true' to your pip.conf file. The latter
    will permanently disable this error.

    If you disable this error, we STRONGLY recommend that you additionally
    pass the '--user' flag to pip, or set 'user = true' in your pip.conf
    file. Failure to do this can result in a broken Homebrew installation.

    Read more about this behavior here: <https://peps.python.org/pep-0668/>

We could follow the change in bug 1831442 and add --break-system-packages to the docs, or follow the other suggestion from the error message and recommend pipx:

brew install pipx
pipx ensurepath
pipx install MozPhab

Dropping from mach-busted, since our generally recommended way is to use ./mach install-moz-phab which presumably avoids this issue.

No longer blocks: mach-busted

Could a link to the generally recommended way be added to the page I referenced? It doesn't seem great to have some incorrect instructions floating around. I don't remember how I stumbled across them.

Flags: needinfo?(standard8)
Flags: needinfo?(standard8) → needinfo?(sheehan)
Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1876182
Resolution: --- → DUPLICATE
Flags: needinfo?(sheehan)
You need to log in before you can comment on or make changes to this bug.