Closed mebigfatguy closed 2 weeks ago
Yeah, that first "externally managed" error is telling you that it's not supported to install packages into the global Python environment with pip if that global environment is managed by some other package manager (APT in this case). I would expect using pipx to work, though I'm surprised that the binary ended up in /usr/local/bin
, I would have expected /root/.local/share/pipx/venvs/vpn-slice/bin/vpn-slice
or so. Can you try sudo pipx uninstall vpn-slice
and see if /usr/local/bin/vpn-slice
still exists? If so, you need to get rid of it by undoing whatever you did to put it there in the first place and then try pipx again.
vpn-slice was in fact in /usr/local/bin, so i ran
sudo pipx uninstall vpn-slice
and removed that directory. then ran
sudo pipx install "vpn-slice[dnspython,setproctitle]"
which produces
installed package vpn-slice 0.16.1, installed using Python 3.12.3 These apps are now globally available
pipx ensurepath
to
automatically add it, or manually modify your PATH in your shell's config file (i.e. ~/.bashrc).then i ran
pipx ensurepath
which produced
/home/dave/.local/bin is already in PATH.
⚠️ All pipx binary directories have been added to PATH. If you are sure you want to proceed, try again with the '--force' flag.
Otherwise pipx is ready to go! ✨ 🌟 ✨
There is nothing in ~/.local/bin
vpn-slice is also now NOT in /usr/local/bin
~/.local/share/pipx/venvs/ is also empty
-- same error
You would need to run sudo pipx ensurepath
since pipx works per-user. However, I would guess (but haven't checked) that openconnect doesn't invoke a shell to run the script, you now just need to provide the fully-qualified path (/root/.local/bin/vpn-slice
) to openconnect.
thank you very much, specifying the full path when running open connect worked.
I've just upgraded to 22 of mint, and
sudo pip3 install "vpn-slice[dnspython,setproctitle]"
produces
error: externally-managed-environment
× This environment is externally managed
So i tried using pipx
sudo pipx install "vpn-slice[dnspython,setproctitle]"
which seemed to work, however, when i do
sudo vpn-slice --self-test
i get
Traceback (most recent call last): File "/usr/local/bin/vpn-slice", line 5, in
from vpn_slice.main import main
ModuleNotFoundError: No module named 'vpn_slice'
Anyone know how to resolve this?