puppet-python icon indicating copy to clipboard operation
puppet-python copied to clipboard

pip and python3.6 on ubuntu bionic

Open Farfaday opened this issue 5 years ago • 3 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.10.1
  • Ruby: 2.5.1
  • Distribution: ubuntu bionic
  • Module version: v4.0.0

How to reproduce (e.g Puppet code you use)

class { 'python': version => '3.6', pip => 'latest', }

What are you seeing

following code install package "python-pip" which is a python 2.7 package. If I do apt autoremove python2.7* and then run puppet, python2.7 packages get re-installed

What behaviour did you expect instead

package python3-pip should be installed

Output log

Any additional information you'd like to impart

Farfaday avatar Jan 21 '20 19:01 Farfaday

Same with ubuntu focal (20.04). Is there a workaround to allow us to specify python3-pip? Otherwise a lot of this module is unuseable on these (very popular) platforms.

alchemyconsulting avatar Nov 09 '20 21:11 alchemyconsulting

Same with ubuntu focal (20.04). Is there a workaround to allow us to specify python3-pip? Otherwise a lot of this module is unuseable on these (very popular) platforms.

@alchemyconsulting not a workaround, but help with pull requests fixing this would help. :smile:

kenyon avatar Nov 11 '20 05:11 kenyon

Looking into this a bit, it's because python::install manifest defaults to installing 'python-pip' package by default, unless some other specific condition exists. One of those conditions is if python::version is specified (it defaults to 'system'), like:

class { 'python':
    version    => 'python3',
  }

This workaround works in Ubuntu 20.04. Obviously the internal manifests should better handle newer OS that have python3 by default, which going forward should always be the case. Python2 is totally EOL and should be killed with fire at this point by default.

alchemyconsulting avatar Nov 23 '20 14:11 alchemyconsulting