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
Upgrade pipx with `python3 -m pip install -U pipx`.
42
42
43
-
To add shell completions, see instructions with
43
+
Shell completions are available by following the instructions printed with this command:
44
44
```
45
45
pipx completions
46
46
```
47
47
48
+
For more details, see the [installation instructions](https://pipxproject.github.io/pipx/installation/).
49
+
50
+
48
51
## Overview: What is `pipx`?
49
52
50
-
pipx is a tool to help you install and run end-user applications written in Python. pipx **is not** a tool for development or publishing of your code. It's kind of like macOS's `brew` (if you are familiar with that), but for Python applications.
53
+
pipx is a tool to help you install and run end-user applications written in Python. pipx **is not** a tool for development or publishing of your code -- it's only for consuming already published packages.
54
+
55
+
If you are familiar macOS's `brew`, it's kind of like that but for Python applications. If you are familiar with JavaScript's [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b), it's kind of like that but also allows you to install packages. If you are familiar with `pip`, it's kind of like that but is only focused on installing packages that have entry points.
51
56
52
-
Python and PyPI allow developers to distribute code with "console script entry points". These scripts let users call into Python code from the command line, effectively acting like standalone applications.
57
+
pipx does not ship with pip, but installing it is often an important part of bootstrapping your system.
53
58
54
-
`pipx` is a tool to install and run any of the thousands of Python applications available on PyPI in a safe, convenient, and reliable way. **In a way, it turns Python Package Index (PyPI) into a big app store for Python applications.** Not all Python packages have entry points, but many do.
59
+
Python and PyPI allow developers to distribute code with "console script entry points". These scripts let users call into Python code from the command line, effectively acting like standalone applications. `pipx` is a tool to install and run any of these thousands of Python applications available on PyPI in a safe, convenient, and reliable way. **In a way, it turns Python Package Index (PyPI) into a big app store for Python applications.** Not all Python packages have entry points, but many do. `pipx` is **not** a tool to install a library and `import` it in your Python code.
55
60
56
61
`pipx` enables you to:
57
62
@@ -61,9 +66,8 @@ Python and PyPI allow developers to distribute code with "console script entry p
61
66
62
67
Best of all, pipx runs with regular user permissions, never calling `sudo pip install` (you aren't doing that, are you? 😄).
63
68
64
-
pipx is similar to JavaScript's [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) - which ships with npm, but also allows you to install instead of just run. pipx does not ship with pip but installing it is often an important part of bootstrapping your system.
65
69
66
-
### Safely installing to isolated environments
70
+
### Walkthrough: Installing a Package and its Applications With `pipx`
67
71
68
72
You can globally install an application by running
69
73
@@ -90,6 +94,7 @@ apps are exposed on your $PATH at /home/user/.local/bin
90
94
- pycowsay
91
95
92
96
97
+
# Now you can run pycowsay from anywhere
93
98
>> pycowsay mooo
94
99
____
95
100
< mooo >
@@ -102,12 +107,17 @@ apps are exposed on your $PATH at /home/user/.local/bin
102
107
||----w |
103
108
|| ||
104
109
105
-
106
110
```
107
111
108
-
### Running in temporary, sandboxed environments
112
+
### Walkthrough: Running an Application in a Temporary, Sandboxed Environment
113
+
114
+
I find this handy when I occasionally run an app and want to use the latest version of it, but don't necessarily need it installed on my computer. You may want to do this when you are initializing a new project and want to set up the right directory structure, when you want to view the help text of an application, or if you simply want to run an app in a one-off case.
109
115
110
-
pipx makes running the latest version of a program in a temporary environment as easy as
116
+
For example, the blog post [How to set up a perfect Python project](https://sourcery.ai/blog/python-best-practices/) uses `pipx run` to kickstart a new project with[cookiecutter](https://github.com/cookiecutter/cookiecutter).
117
+
118
+
A nice side benefit is that you don't have to remember to upgrade the app it since `pipx run` will automatically run a recent version for you.
119
+
120
+
Okay, let's see what this looks like in practice!
111
121
112
122
```
113
123
pipx run APP [ARGS...]
@@ -121,9 +131,7 @@ pipx run pycowsay moo
121
131
122
132
Notice that you **don't need to execute any install commands to run the app**.
123
133
124
-
Re-running the same app is quick because pipx caches Virtual Environments on a per-app basis. These caches last two days.
125
-
126
-
I find this handy when I want to quickly see the help text of an application, or when I occasionally run an app but don't necessarily want it hanging around on my system. A nice side benefit is that you don't have to remember to upgrade it since `pipx run` will automatically run a recent version for you.
134
+
Re-running the same app is quick because pipx caches Virtual Environments on a per-app basis. The caches only last a few days, and when they expire, pipx will again use the latest version of the package. This way you can be sure you're always running a new version of the package without having to manually upgrade.
127
135
128
136
You can run .py files directly, too.
129
137
@@ -167,4 +175,6 @@ Contributors
167
175
-[Paul Moore](https://github.com/pfmoore)
168
176
-[tkossak](https://github.com/tkossak)
169
177
-[Tzu-ping Chung](https://github.com/uranusjr)
170
-
-[Shawn Hensley](https://github.com/sahensley)
178
+
-[Shawn Hensley](https://github.com/sahensley)
179
+
180
+
Logo by [@IrishMorales](https://github.com/IrishMorales).
Upgrade pipx with `python3 -m pip install -U pipx`.
42
42
43
-
To add shell completions, see instructions with
43
+
Shell completions are available by following the instructions printed with this command:
44
44
```
45
45
pipx completions
46
46
```
47
47
48
+
For more details, see the [installation instructions](https://pipxproject.github.io/pipx/installation/).
49
+
50
+
48
51
## Overview: What is `pipx`?
49
52
50
-
pipx is a tool to help you install and run end-user applications written in Python. pipx **is not** a tool for development or publishing of your code. It's kind of like macOS's `brew` (if you are familiar with that), but for Python applications.
53
+
pipx is a tool to help you install and run end-user applications written in Python. pipx **is not** a tool for development or publishing of your code -- it's only for consuming already published packages.
54
+
55
+
If you are familiar macOS's `brew`, it's kind of like that but for Python applications. If you are familiar with JavaScript's [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b), it's kind of like that but also allows you to install packages. If you are familiar with `pip`, it's kind of like that but is only focused on installing packages that have entry points.
51
56
52
-
Python and PyPI allow developers to distribute code with "console script entry points". These scripts let users call into Python code from the command line, effectively acting like standalone applications.
57
+
pipx does not ship with pip, but installing it is often an important part of bootstrapping your system.
53
58
54
-
`pipx` is a tool to install and run any of the thousands of Python applications available on PyPI in a safe, convenient, and reliable way. **In a way, it turns Python Package Index (PyPI) into a big app store for Python applications.** Not all Python packages have entry points, but many do.
59
+
Python and PyPI allow developers to distribute code with "console script entry points". These scripts let users call into Python code from the command line, effectively acting like standalone applications. `pipx` is a tool to install and run any of these thousands of Python applications available on PyPI in a safe, convenient, and reliable way. **In a way, it turns Python Package Index (PyPI) into a big app store for Python applications.** Not all Python packages have entry points, but many do. `pipx` is **not** a tool to install a library and `import` it in your Python code.
55
60
56
61
`pipx` enables you to:
57
62
@@ -61,9 +66,8 @@ Python and PyPI allow developers to distribute code with "console script entry p
61
66
62
67
Best of all, pipx runs with regular user permissions, never calling `sudo pip install` (you aren't doing that, are you? 😄).
63
68
64
-
pipx is similar to JavaScript's [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) - which ships with npm, but also allows you to install instead of just run. pipx does not ship with pip but installing it is often an important part of bootstrapping your system.
65
69
66
-
### Safely installing to isolated environments
70
+
### Walkthrough: Installing a Package and its Applications With `pipx`
67
71
68
72
You can globally install an application by running
69
73
@@ -90,6 +94,7 @@ apps are exposed on your $PATH at /home/user/.local/bin
90
94
- pycowsay
91
95
92
96
97
+
# Now you can run pycowsay from anywhere
93
98
>> pycowsay mooo
94
99
____
95
100
< mooo >
@@ -102,12 +107,17 @@ apps are exposed on your $PATH at /home/user/.local/bin
102
107
||----w |
103
108
|| ||
104
109
105
-
106
110
```
107
111
108
-
### Running in temporary, sandboxed environments
112
+
### Walkthrough: Running an Application in a Temporary, Sandboxed Environment
113
+
114
+
I find this handy when I occasionally run an app and want to use the latest version of it, but don't necessarily need it installed on my computer. You may want to do this when you are initializing a new project and want to set up the right directory structure, when you want to view the help text of an application, or if you simply want to run an app in a one-off case.
109
115
110
-
pipx makes running the latest version of a program in a temporary environment as easy as
116
+
For example, the blog post [How to set up a perfect Python project](https://sourcery.ai/blog/python-best-practices/) uses `pipx run` to kickstart a new project with[cookiecutter](https://github.com/cookiecutter/cookiecutter).
117
+
118
+
A nice side benefit is that you don't have to remember to upgrade the app it since `pipx run` will automatically run a recent version for you.
119
+
120
+
Okay, let's see what this looks like in practice!
111
121
112
122
```
113
123
pipx run APP [ARGS...]
@@ -121,9 +131,7 @@ pipx run pycowsay moo
121
131
122
132
Notice that you **don't need to execute any install commands to run the app**.
123
133
124
-
Re-running the same app is quick because pipx caches Virtual Environments on a per-app basis. These caches last two days.
125
-
126
-
I find this handy when I want to quickly see the help text of an application, or when I occasionally run an app but don't necessarily want it hanging around on my system. A nice side benefit is that you don't have to remember to upgrade it since `pipx run` will automatically run a recent version for you.
134
+
Re-running the same app is quick because pipx caches Virtual Environments on a per-app basis. The caches only last a few days, and when they expire, pipx will again use the latest version of the package. This way you can be sure you're always running a new version of the package without having to manually upgrade.
127
135
128
136
You can run .py files directly, too.
129
137
@@ -167,4 +175,6 @@ Contributors
167
175
-[Paul Moore](https://github.com/pfmoore)
168
176
-[tkossak](https://github.com/tkossak)
169
177
-[Tzu-ping Chung](https://github.com/uranusjr)
170
-
-[Shawn Hensley](https://github.com/sahensley)
178
+
-[Shawn Hensley](https://github.com/sahensley)
179
+
180
+
Logo by [@IrishMorales](https://github.com/IrishMorales).
Copy file name to clipboardExpand all lines: docs/installation.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,12 @@ pipx's default binary location is `~/.local/bin`. This can be overriden with the
23
23
24
24
pipx's default virtual environment location is `~/.local/pipx`. This can be overridden with the environment variable `PIPX_HOME`.
25
25
26
+
## Shell Completion
27
+
You can easily get your shell's tab completions working by following instructions printed with this command:
28
+
```
29
+
pipx completions
30
+
```
31
+
26
32
## Install pipx Development Versions
27
33
New versions of pipx are published as beta or release candidates. These versions look something like `0.13.0b1`, where `b1` signifies the first beta release of version 0.13. These releases can be tested with
0 commit comments