Skip to main content

cPanel Internal python

Comments

5 comments

  • cPanelAaronH
    Hey there, cPsrvd is going to use the system version since it's compiled. If you run this on a CentOS 8 server with cPanel 92, are you able to run this under Python3?
    0
  • gnusys
    Hi, No. I tested this in CentOS8 and cPanel v92 and it is still using python2 [CODE=bash]# # cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) # /usr/local/cpanel/cpanel -V 92.0 (build 0) # strings /usr/local/cpanel/cpsrvd|grep python python Could not locate a working python /usr/bin/python2 $python_bin
    Are you going to keep this like this or will there be a shift to python3 sometime? Since cPanel itself does not rely on python, It would be great if there is some way the shebang line is honoured and users can choose the python interpreter for cpsrvd too
    0
  • gnusys
    From the RHEL8/CentOS-8 release notes Dynamic programming languages, web and database servers Python 3.6 is the default Python implementation in RHEL 8; limited support for Python 2.7 is provided. No version of Python is installed by default. It seems CentOS-8 offers only limited support for python2 ( note it's being sunsetted for almost 1 year now). I do find many python2-xxx module RPM's missing in CentOS8 It could be installed via pip, but won't be a neat solution.
    0
  • cPRex Jurassic Moderator
    Hey there, @gnusys - we have a nice thread with more details about Python3 here:
    0
  • gnusys
    Ok, I read it up. Luckily I could just ship a few extra python modules as RPM in my repository and have the code run in python2 in Centos8. So hopefully it is a smooth transition for me
    0

Please sign in to leave a comment.