I am facing an issue porting an existing python plugin for cPanel to python3 . It looks like the cPanel part of the plugin always run on python2.7 ( default python on Centos7) , irrespective of the fact that we add #!/usr/bin/python3 as the shebang line.
Now the WHM plugin part works pretty well and it respects the shebang line and works on python2 or python3
If I do on the script
it always shows Python version 2.7.5
I am porting the plugin to python3 because CentOS8 comes with python3 as default and I do not want to maintain 2 pieces of code for CentOS7 and CentOS8
Is this is a limitation imposed by cPanel and if yes is there a way to override/change the python version in cpaneld
NOTE: this is not about running a python app in apache, but a plugin in cpaneld ( the cpanel daemon)
Now the WHM plugin part works pretty well and it respects the shebang line and works on python2 or python3
If I do on the script
Python:
import sys
print (sys.version)
I am porting the plugin to python3 because CentOS8 comes with python3 as default and I do not want to maintain 2 pieces of code for CentOS7 and CentOS8
Is this is a limitation imposed by cPanel and if yes is there a way to override/change the python version in cpaneld
NOTE: this is not about running a python app in apache, but a plugin in cpaneld ( the cpanel daemon)
Last edited by a moderator: