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

puppet not install the latest version of pip #268

Closed
twmht opened this issue Dec 3, 2015 · 2 comments
Closed

puppet not install the latest version of pip #268

twmht opened this issue Dec 3, 2015 · 2 comments
Assignees

Comments

@twmht
Copy link

twmht commented Dec 3, 2015

Hi,

I am trying to install latest pip (7.1.2) from puppet 3.8.4.

class { 'python' :
    version     => 'system',
    pip         => 'latest',
    dev         => 'latest',
    virtualenv  => 'present',
    gunicorn    => 'present',
 }

But it only installed very old version (1.5.4).

Is something wrong?

Thank you!

@erikanderson
Copy link

This is because the module is installing the python-pip package from the OS repo. I think it would be good to have an option to use the newest version from here: https://pip.pypa.io/en/stable/installing/

Edit: I just looked at the latest version and it looks like it does allow you to install the latest version of pip here (in manifests/install.pp):

  case $python::provider {
    pip: {
      # Install pip without pip, see https://pip.pypa.io/en/stable/installing/.
      exec { 'bootstrap pip':
        command => '/usr/bin/curl https://bootstrap.pypa.io/get-pip.py | python',
        unless  => '/usr/bin/which pip',
        require => Package['python'],
      }

      # Puppet is opinionated about the pip command name
      file { 'pip-python':
        ensure  => link,
        path    => '/usr/bin/pip-python',
        target  => '/usr/bin/pip',
        require => Exec['bootstrap pip'],
      }

      Exec['bootstrap pip'] -> File['pip-python'] -> Package <| provider == pip |>

      Package <| title == 'pip' |> {
        name     => 'pip',
        provider => 'pip',
      }
      Package <| title == 'virtualenv' |> {
        name     => 'virtualenv',
        provider => 'pip',
      }
    }

@shivapoudel
Copy link
Contributor

@erikanderson Thanks for the clearance xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants