Installing moz-phab externally-managed-environment error on ubuntu 23.04
Categories
(Conduit :: moz-phab, defect)
Tracking
(Not tracked)
People
(Reporter: ahale, Assigned: ahochheiden)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
|
3.97 KB,
text/plain
|
Details | |
|
Bug 1831442 - Fix an issue with `./mach install-moz-phab` on `Ubuntu 23.04` and `Debian 12` r?#build
48 bytes,
text/x-phabricator-request
|
Details | Review |
Trying to bootstrap on a fresh install of ubuntu 23.04 to work on another bug, and I first encountered problems with pip3 being unable to install Mercurial, I worked around that by installing Mercurial system-wide, so far so good, but then I encounter the same problem with moz-phab and there is no python3-MozPhab package on ubuntu to work around this error.
Attached the most relevant part of the output.
Comment 1•2 years ago
|
||
There is arguably a bug on the Ubuntu side: the command that is being run is only asking to list what is installed, it's not trying to install things. (/usr/bin/python3 -m pip show -f MozPhab)
(In reply to Mike Hommey [:glandium] from comment #1)
There is arguably a bug on the Ubuntu side: the command that is being run is only asking to list what is installed, it's not trying to install things. (
/usr/bin/python3 -m pip show -f MozPhab)
To test this I spun up a clean Ubuntu Lunar image, installed python3-pip, and ran pip show:
glob@ubuntu:~$ /usr/bin/python3 -m pip show -f MozPhab
WARNING: Package(s) not found: MozPhab
I was only able to trigger the warning with pip install:
glob@ubuntu:~$ /usr/bin/python3 -m pip install MozPhab
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Comment 5•2 years ago
|
||
Having encountered this myself now, what's failing is the pip install --user that precedes the pip show. I don't know why they made --user fail... a work around is to set the PIP_BREAK_SYSTEM_PACKAGES environment variable to 1 (or changing the pip install command to pass --break-system-packages).
Updated•2 years ago
|
This is a problem in how bootstrap installs moz-phab, not in moz-phab itself.
Comment 7•2 years ago
|
||
The install-moz-phab command is in tools/phabricator, not python/mozboot. The moz-phab component is the closest wrt ownership.
| Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 10•2 years ago
|
||
| bugherder | ||
Comment 11•9 months ago
|
||
Should the install instructions at
https://moz-conduit.readthedocs.io/en/latest/mozphab-linux.html
also mention that it's necessary to set
PIP_BREAK_SYSTEM_PACKAGES=1 ?
Description
•