Skip to content

Programmatically install missing python with pyenv #6408

@ohshazbot

Description

@ohshazbot

Automatic Python Installation is a great feature and I love it. I want to use it more, however I'm thinking it's tied to having stdin or something, because I cannot programmatically install python along with my code on a remote resource. It would be swell if there was an environment variable or flag or something to say "yes, please always install this missing python version if I have pyenv available".

Is your feature request related to a problem? Please describe.

I'm trying to do a remote installation via ansible and am trying to reduce having to track the intended version of python in multiple places

Describe the solution you'd like

A flag or environment variable that would:

  1. be treated as an automatic yes response in the conditions when the version of python isn't available by pyenv is available
  2. still works when pipenv install is being executed without stdin (or whatever mechanism is used to distinguish this case from the "was not found... You can specify specific versions of Python with" case.

Describe alternatives you've considered

I tried piping yes, but that does not work via these remote executations. I'm currently working on a manual solution that parses python version out of the Pipfile (having a utility that can return that detail would help)

Additional context

I'm operating against a few LTS versions of Ubuntu, and python 3.10+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions