puppet-python
puppet-python copied to clipboard
pip and python3.6 on ubuntu bionic
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
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.
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:
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.