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

System Python cannot be installed on Ubuntu 24.04

Open akomakom opened this issue 1 year ago • 1 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 8
  • Ruby: 3.2.5
  • Distribution: Ubuntu 24.04
  • Module version: mod 'puppet-python', '7.4.0'

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

Use the example from the README:


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

What are you seeing

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python' returned 100: Reading package lists...                                                       
Building dependency tree...                                                                                                                                                                 
Reading state information...                                                                                                                                                                
Package python is not available, but is referred to by another package.                                                                                                                     
This may mean that the package is missing, has been obsoleted, or                                                                                                                           
is only available from another source                                                                                                                                                       
However the following packages replace it:                                                                                                                                                  
  2to3 python-is-python3     

What behaviour did you expect instead

Python should be installed (possibly via apt install python-is-python-3)

Output log

Any additional information you'd like to impart

akomakom avatar Dec 19 '24 13:12 akomakom

Hello, I just ran into this problem when working on an ubuntu24 host.

The 'version => system' directive seems to be misdocumented and may not be necessary on Ubuntu24. The following worked for me:

class profile::python {
  class { 'python':
    pip => present,
    dev => present,
  }
}

What solution did you use to this problem?

jjarokergc avatar Jun 17 '25 14:06 jjarokergc