Unable to install python-distutils / package not found

Hey there,

I’m using IPFire as part of a framework I’m working on, which includes some automated tests where several VMs are being built using packer/ansible; two of these run on IPFire (core141) and act as routers. Recently, these pipelines always failed due to pakfire not finding and thus being unable to install the package “python-distutils” (needed for some ansible-tasks later on).

What could cause this? I’m not that experienced yet, so I just tried the usual:

  • ensured internet connectivity
  • ran pakfire update
  • upgraded from core141 to core158
  • started the packer build from the core158 .iso

But none of these resolved the problem. Any help here would be much appreciated :slight_smile:

Hi @maspital

Welcome to the IPFire community.

Python2 is EOL since Jan 2020 so there are no further bug fixes etc to python2 or the modules that only work with python2.
Python2 was therefore deprecated in IPFire with the announcement of the Core Update 157 Testing release.

https://blog.ipfire.org/post/ipfire-2-25-core-update-157-available-for-testing

python-distutils is a python2 only module. Development or updates of distutils stopped in 2012 and the PyPI organisation indicated that setuptools should be used instead.

Since the deprecation notice activities have been ongoing to migrate all python2 functions to python3.
python-distutils and python-distutils-extra were removed from IPFire. Currently python-setuptools is still in IPFire but will likely be removed in the upcoming weeks.
python3-setuptools is available in IPFire since Core Update 157.
Now packages that need python2 for being built are currently being converted to be able to be built with python3 or without python2 being present.

The current plan is to be able to remove python2 from IPFire in Core Update 160.

So if your ansible-task is using python-distutils then you need to update it to use the equivalent functionality in python3-setuptools or in python3 itself.
Also if you have any python2 scripts that run in your IPFire then you need to migrate them to python3.

3 Likes