pyenv-python-installed

Example:

# Install the latest version of Python.
- pyenv-python-installed

Description

Note: this is mostly deprecated now by the 'python-lang-installed' frecklet.

Install a Python environment for a user, using pyenv.

This will install all dependencies required to build Python, then it will download the specified version of Python, compile it, and use the 'pyenv global' command (which will write that information into the file $HOME/.pyenv/version) to make it the default version for the user.

It will also add a piece of code to $HOME/.bashrc to load pyenv when the user logs in. If you use this to install Python for a user different to the executing one, make sure to specify the 'path' argument (absolute path required, relative or using '~'/'$HOME' won't work).

Resources

Variables

Name Type Default Description

path

string --

Defaults to $HOME/.pyenv

set_global

boolean True

Don't set 'global' version.

user

string --

The user to install pyenv for.

version

n/a 3.7.3

The version of Python to install.

Examples

Example 1

Install the latest version of Python.

Code
- pyenv-python-installed

Example 2

Install Python version 3.6.8 for user 'freckles'.

Code
- pyenv-python-installed:
    version: 3.6.8
    user: freckles
Description

The user 'freckles' will be created if it doesn't exist yet.

Command-line

frecklecute --community pyenv-python-installed --help

Usage: frecklecute pyenv-python-installed [OPTIONS]

  **Note**: this is mostly deprecated now by the 'python-lang-installed'
  frecklet.

  Install a Python environment for a user, using
  [pyenv](https://github.com/pyenv/pyenv).

  This will install all dependencies required to build Python, then it will
  download the specified version of Python, compile it, and use the 'pyenv
  global' command (which will write that information into the file
  $HOME/.pyenv/version) to make it the default version for the user.

  It will also add a piece of code to ``$HOME/.bashrc`` to load pyenv when
  the user logs in. If you use this to install Python for a user different
  to the executing one, make sure to specify the 'path' argument (absolute
  path required, relative or using '~'/'$HOME' won't work).

Options:
  --path PATH                     The path to install pyenv into.
  --set-global / --no-set-global  Don't set 'global' version.
  --user USER                     The user to install pyenv for.
  --version VERSION               The version of Python to install.  [default:
                                  3.7.3]
  --help                          Show this message and exit.