-
-
Notifications
You must be signed in to change notification settings - Fork 27
Description
🤯 Problem Statement
In CentOS 8 (RHEL 8, etc) python2 is deprecated and you should work with python 3 only. However there is no link for 'pip' to 'pip3'. This feature request is to look at the best way to disallow python 2 for centos 8 and update the places were necessary to use the native python3 / pip3 binaries.
❔ Possible Solution
I am currently working around it by doing this (requires Alternatives cookbook):
package 'python3-pip'
if node['platform_version'].to_i >= 8
alternatives 'pip set version 3' do
link_name 'pip'
path '/usr/bin/pip3'
priority 1
action :install
end
end
⤴️ Describe alternatives you've considered
As RHEL 8 family is quite new and adoption might be low currently I suspect not many people noticed the cookbook not working out of the box. I considered going the python2 route on rhel 8 family, but strongly feel this is the incorrect way to move forward.
Especially as I read rhel 8 family has deprecated python 2, which means it might not be as maintained as one might want.
➕ Additional context
N/A