pipx
pipx copied to clipboard
Global parameter does not work using ensurepath command
Describe the bug
Follow the pipx install documentation for MacOS causes a "unrecognized arguments" error on ensurepath command.
How to reproduce
➜ ~ sudo pipx ensurepath --global Password: usage: pipx [-h] [--quiet] [--verbose] [--global] [--version] {install,uninject,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,interpreter,run,runpip,ensurepath,environment,completions} ... pipx: error: unrecognized arguments: --global ➜ ~
Expected behavior
Install pipx globally without errors
Hi @marcosalberto, could you please provide the version of pipx you are on?
Edit: I just saw your PR. Does setting --global right after
pipx instead of after ensurepath fix it for you?
Hi @Gitznik,
I'm using the 1.5.0 version and change the parameter position fixes the issue.
➜ ~ pipx --version
1.5.0
Sorry by didn't add a comment making reference to the PR.
Ah, I just installed pipx for the first time and caught this.
This works.
sudo pipx --global ensurepath
This doesn't work
sudo pipx ensurepath --global
Same issue here, exactly as @boris-ning-usds described.
Will work as described in the documentation in the upcoming pipx version (#1397).
i have issue with ~ ❯ sudo pipx --global ensurepat usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,completions} ... pipx: error: argument command: invalid choice: 'ensurepat' (choose from 'install', 'inject', 'upgrade', 'upgrade-all', 'uninstall', 'uninstall-all', 'reinstall', 'reinstall-all', 'list', 'run', 'runpip', 'ensurepath', 'completions')
and ~ ❯ sudo pipx ensurepath --global ✘ 2 usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,completions} ... pipx: error: unrecognized arguments: --global
i have issue with ~ ❯ sudo pipx --global ensurepat usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,completions} ... pipx: error: argument command: invalid choice: 'ensurepat' (choose from 'install', 'inject', 'upgrade', 'upgrade-all', 'uninstall', 'uninstall-all', 'reinstall', 'reinstall-all', 'list', 'run', 'runpip', 'ensurepath', 'completions')
there's a typo in ensurepath
I have the same issue: sudo pipx --global ensurepath usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions} ... pipx: error: unrecognized arguments: --global
sudo pipx ensurepath --global usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions} ... pipx: error: unrecognized arguments: --global
I have the same issue: sudo pipx --global ensurepath usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions} ... pipx: error: unrecognized arguments: --global
sudo pipx ensurepath --global usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,environment,completions} ... pipx: error: unrecognized arguments: --global
Which version of pipx are you on? (pipx --version)
I had the same error with pipx 1.0.0
none of the following work:
pipx --global ensurepath
pipx ensurepath --global
# neither of these with sudo
I followed docs for ubuntu installation and ended up with 1.0.0, when the latest is 1.6.0 🤷♂️
Fix:
sudo apt install python3-pip -y #skip this step if pip is already installed
python3 -m pip install --user --upgrade pipx
sudo pipx ensurepath --global
I followed docs for ubuntu installation and ended up with 1.0.0, when the latest is 1.6.0 🤷♂️
Yes, unfortunately the pipx version bundled for ubuntu is massively outdated (see here), and the --global flag was not around in version 1.0.
Should we suggest to use pipx-managed pipx as discussed here: https://github.com/pypa/pipx/discussions/1341 ?
IMO, it works quite well for me on Linux/Mac/Windows.
Should we suggest to use pipx-managed pipx as discussed here: #1341 ?
IMO, it works quite well for me on Linux/Mac/Windows.
Mind opening a new issue for this?
Mind opening a new issue for this?
Here we go: https://github.com/pypa/pipx/issues/1449