You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Up front pipx rocks! I mean, it should really be part of the standard pip to support isolated system installs given how widespread Python is now and used in system utilities and the package version conflict issues that threatens on system installs.
And pipx install --global seems to do what is needed (though sudo pipx install is IMHO broken and should do the same thing, install globally but instead installs for the root user).
sudo pipx ensurepath --global # optional to allow pipx actions in global scope. See "Global installation" section below.
and sudo pipx ensurepath --global does no such thing. This is very broken.
Cautious as I am, and the doc being rather sparse in this area stating only:
--global Perform action globally for all users.
not sharing how that is done, and discovering pip relies heavily on userpath which does not share what it does (works like a magic box) and so I filed an issue there too: ofek/userpath#59, I cloned pipx and single stepped:
pipx ensurepath --global --force
to make sure I understood right (as my code review as not encouraging, but the levels of indirection and abstraction certainly warrant neutering userpath by commenting out the file writes in put and logging its actions, but I was right, it's broken).
Here's what
sudo pipx ensurepath --global
claims to do and is recommended on the basis of:
allow pipx actions in global scope.
But what it does is it adds PATH updates to two files only being ~/.bashrc and ~/.profile being:
# Created by pipx on <date>
export PATH="$PATH:/usr/local/bin"
# Created by pipx on <date>
export PATH="$PATH:/home/bernd/.local/bin"
The duplicity aside (it could be a little smarter and do this in one line when needed, but then pipx has delegated all that to userpath which is still evolving too) neither of the files written to deliver on the promise of allowing pipx actions in global scope.
No way that Is slice does this deliver. Neither in global scope interpreted to mean "for all users" nor in global scope interpreted to mean in by adding the global bin home (/opt/pipx by default: https://github.com/pypa/pipx/blob/main/src/pipx/paths.py).
I would argue that (or I would expect that) sudo pipx ensurepath --global adds the global bin dir (defaulting to /usr/local/bin) to the global path (in /etc/environment).
Not a crisis, but given the blind delegation to userpath that does magic box changes (as per issue above), I have insufficient faith in ensurepath to be recommending it to anyone and would recommend ensuring paths manually at present.
The text was updated successfully, but these errors were encountered:
Up front
pipx
rocks! I mean, it should really be part of the standard pip to support isolated system installs given how widespread Python is now and used in system utilities and the package version conflict issues that threatens on system installs.And
pipx install --global
seems to do what is needed (thoughsudo pipx install
is IMHO broken and should do the same thing, install globally but instead installs for the root user).Alas the documentation (@ https://pipx.pypa.io/stable/installation/) suggests:
sudo pipx ensurepath --global # optional to allow pipx actions in global scope. See "Global installation" section below.
and
sudo pipx ensurepath --global
does no such thing. This is very broken.Cautious as I am, and the doc being rather sparse in this area stating only:
--global Perform action globally for all users.
not sharing how that is done, and discovering pip relies heavily on
userpath
which does not share what it does (works like a magic box) and so I filed an issue there too: ofek/userpath#59, I cloned pipx and single stepped:pipx ensurepath --global --force
to make sure I understood right (as my code review as not encouraging, but the levels of indirection and abstraction certainly warrant neutering userpath by commenting out the file writes in
put
and logging its actions, but I was right, it's broken).Here's what
sudo pipx ensurepath --global
claims to do and is recommended on the basis of:
allow pipx actions in global scope.
But what it does is it adds PATH updates to two files only being
~/.bashrc
and~/.profile
being:The duplicity aside (it could be a little smarter and do this in one line when needed, but then pipx has delegated all that to userpath which is still evolving too) neither of the files written to deliver on the promise of allowing pipx actions in global scope.
No way that Is slice does this deliver. Neither in global scope interpreted to mean "for all users" nor in global scope interpreted to mean in by adding the global bin home (
/opt/pipx
by default: https://github.com/pypa/pipx/blob/main/src/pipx/paths.py).I would argue that (or I would expect that)
sudo pipx ensurepath --global
adds the global bin dir (defaulting to/usr/local/bin
) to the global path (in /etc/environment).Not a crisis, but given the blind delegation to userpath that does magic box changes (as per issue above), I have insufficient faith in ensurepath to be recommending it to anyone and would recommend ensuring paths manually at present.
The text was updated successfully, but these errors were encountered: