Skip to main content

When will Cpanel migrate to Python3 and how to install safely Py3

Comments

3 comments

  • cPRex Jurassic Moderator
    Hey there! Lots of good questions here, and I'll see if I can answer them all for you. The main thing to remember with any of the internal cPanel tools is that there are internal versions of the software running. For example, you can still access WHM and cPanel when PHP and Apache are offline due to internal cPanel versions of PHP that are separate from the public webserver version. With that in mind, let's go through and answer these: Question 1 - can i simply install python 3 with "yum install python3"? (found in a thread in this forum with a moderator validating it) I tried this in my second VPS with whm+cpanel and i could not find obvious issues, I can call python 2 as "python" and python 3 as "python3" same for pip and pip3. If this is not the right way, is there a very explicit "cpanel suggested way"? I believe there should be a HUGE FAQ with this explained in clear detail. Answer: Installing packages through Yum like this will not change the internal Python used for applications like mailman or other tools. Those are all controlled by /usr/local/cpanel/3rdparty/bin/python, while a "yum install python" command will update data in /usr/bin/python. As you've found, "yum install python3" will get you a completely separate version that you can call directly. Question 2 - Will this way potentially mess up something in the future? Answer: This is the one I'm not sure I can answer. It's just not possible for us to say how something custom could interfere with something in the future that hasn't been developed yet. However, as mentioned in the answer to Question 1, the internal Python tools are separate from what you'll install with Yum. Question 3 - What will happen when whm will try to upgrade to python3 finding another one already installed? Will this ever happen? Why nobody talks about this? It's definitely not possible imagining whm using 2.7 in 2022! Answer: I've reached out to one of our development teams to see if there has been any discussion about getting this updated yet. I'll keep this thread marked as "new thread" so I can come back to it later with a more detailed answer for this one. Quesiton 4 - Are python installations totally independent this way? So i can totally remove python3 without compromising anything server side? Answer: That's correct.
    0
  • d3stroyah
    I wanted to thank you for the detailed answer and time taken.
    0
  • cPRex Jurassic Moderator
    I just heard back from the developers and an update to v3 is being discussed, but it's not officially planned for any specific release at this time. So for that one, "in the works" is the best I can offer at this point. And you're very welcome!
    0

Please sign in to leave a comment.