pyenv icon indicating copy to clipboard operation
pyenv copied to clipboard

Add support for CentOS 8 (python 3)

Open mvangoor opened this issue 5 years ago • 0 comments

🤯 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.

:grey_question: 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

:arrow_heading_up: 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.

:heavy_plus_sign: Additional context

N/A

mvangoor avatar Sep 26 '20 16:09 mvangoor