mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Add documentation for exec command (#2090)
This commit is contained in:
parent
bb6a747c02
commit
0688b17cc1
1 changed files with 16 additions and 0 deletions
16
COMMANDS.md
16
COMMANDS.md
|
@ -16,6 +16,7 @@ The most common subcommands are:
|
||||||
* [`pyenv versions`](#pyenv-versions)
|
* [`pyenv versions`](#pyenv-versions)
|
||||||
* [`pyenv which`](#pyenv-which)
|
* [`pyenv which`](#pyenv-which)
|
||||||
* [`pyenv whence`](#pyenv-whence)
|
* [`pyenv whence`](#pyenv-whence)
|
||||||
|
* [`pyenv exec`](#pyenv-exec)
|
||||||
* [`pyenv root`](#pyenv-root)
|
* [`pyenv root`](#pyenv-root)
|
||||||
* [`pyenv prefix`](#pyenv-prefix)
|
* [`pyenv prefix`](#pyenv-prefix)
|
||||||
* [`pyenv hooks`](#pyenv-hooks)
|
* [`pyenv hooks`](#pyenv-hooks)
|
||||||
|
@ -282,6 +283,21 @@ Lists all Python versions with the given command installed.
|
||||||
2.7.6
|
2.7.6
|
||||||
3.3.3
|
3.3.3
|
||||||
|
|
||||||
|
## `pyenv exec`
|
||||||
|
|
||||||
|
`Usage: pyenv exec <command> [arg1 arg2...]`
|
||||||
|
|
||||||
|
Runs an executable by first preparing PATH so that the selected Python
|
||||||
|
version's `bin` directory is at the front.
|
||||||
|
|
||||||
|
For example, if the currently selected Python version is 3.9.7:
|
||||||
|
|
||||||
|
`pyenv exec pip install -r requirements.txt`
|
||||||
|
|
||||||
|
is equivalent to:
|
||||||
|
|
||||||
|
`PATH="$PYENV_ROOT/versions/3.9.7/bin:$PATH" pip install -r requirements.txt`
|
||||||
|
|
||||||
## `pyenv root`
|
## `pyenv root`
|
||||||
|
|
||||||
Displays the root directory where versions and shims are kept.
|
Displays the root directory where versions and shims are kept.
|
||||||
|
|
Loading…
Reference in a new issue