Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Update installation method for linux users #972

Merged
merged 4 commits into from
Nov 30, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,19 @@ pipx ensurepath

Upgrade pipx with `brew update && brew upgrade pipx`.


dukecat0 marked this conversation as resolved.
Show resolved Hide resolved
### On Linux, install via pip (requires pip 19.0 or later)
dukecat0 marked this conversation as resolved.
Show resolved Hide resolved

- Ubuntu 23.04 or above
dukecat0 marked this conversation as resolved.
Show resolved Hide resolved

```sh
dukecat0 marked this conversation as resolved.
Show resolved Hide resolved
sudo apt install pipx
dukecat0 marked this conversation as resolved.
Show resolved Hide resolved
pipx ensurepath
```

- Ubuntu 22.04 or below
Copy link
Contributor

@chrysle chrysle Apr 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Ubuntu 22.04 or below
Or, install via pip:

Installing via pip is still recommended, since new versions of pipx will be directly uploaded to PyPi and be pip-installable, in contrast to the version freeze in Ubuntu.
I'd tend to remove this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d even drop the and for other distributions part, most users should be smart enough to infer that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #982. Installing via pip may not work. Or maybe we can suggest users use pipx through zipapp?

curl -L https://github.com/pypa/pipx/releases/latest/download/pipx.pyz -o pipx.pyz
alias pipx="/path/to/python/interpreter pipx.pyz"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sueggesting the pyz is probably the best thing to do. Instead of alias (which needs to be added to rc) it’s probably better to suggest adding a script fix somewhere in PATH that does exec ..../python ..../pipx.pyz

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where should the zipapp be stored? And it must be updated by hand, this should probably be included in the script fix.

Also, I don't think it should be suggested to tweak the PATH (if that is what you want).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be added to ~/.local/bin. pipx ensurepath would add that to PATH.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think of a script approach like in #849 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can merge this PR first, and leave all these works in the follow-up PRs? :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, pipx.pyz contains a shellbang header so it can be made executable directly.


```sh
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```
Expand Down