Installing a Python Program

Discussion in 'IT & Internet' started by consultant, Oct 2, 2020.

  1. consultant

    consultant Your Business Community Staff Member

    5,693 804
    I am looking at testing an e-commerce platform called Shuup (following a different topic on here).

    It requires Python/Django, which isn't something I am used to.

    I can't work out how to add Python on a CPanel installation (it is my server), but, if I have to, I could spin up a new test server, but would rather not!

    CPanel do not seem to officially support Python, but there are lots of references to 'using python from the control panel'.

    Anyone with tips or pointers?
     
    Posted: Oct 2, 2020 By: consultant Member since: Jan 21, 2008
    #1
  2. gpietersz

    gpietersz UKBF Ace Full Member

    1,573 391
    Most of my development work is Python/Django. You can use it with CPanel, but its not exactly convenient.

    I have one client who uses CPanel (because their other sites are all PHP) and I found it a lot more work to set up Python sites the CPanel way than on the command line as I usually do. We ended up compiling mod_wsgi and jumping through a lot of hoops - luckily there is a server admin so most of it was not my job.

    My preference would be to run it on a separate server. its quite likely a lot of your required (or optimal) stack would be different - my Django sites usually use Nginx and Postgres for example.

    If you do want to run it on the same server, especially if you are just running it to evaluate it, I would suggest running an app server like Gunicorn to run Shuup and configuring Apache as a proxy and to serve static files.

    I suggest Gunicorn over alternatives because it is popular, simple and well documented. I am assuming Apache as the default (only non-experimental?) server choice in Cpanel.
     
    Posted: Oct 2, 2020 By: gpietersz Member since: Sep 10, 2019
    #2
  3. consultant

    consultant Your Business Community Staff Member

    5,693 804
    Thanks for that great response.

    I do not want to risk issues with the main server, so will probably spin up a £5/m virtual to at least play with things.

    BTW, I believe CPanel are about to release something for Nginx!
     
    Posted: Oct 2, 2020 By: consultant Member since: Jan 21, 2008
    #3