cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Am getting Python/CGI errors; does cPanel support?

I’m getting 500 Internal Service errors when trying to access my python and CGI files, and error log isn’t reading any faults. I’ve changed .htaccess and set permissions according to the other posts on this issue. I’ve also tried re-saving the files in Notepad to make sure the encoding is correct. I’ve tried using #! usr/local/bin/python2.7 and #! usr/bin/python. Neither that, nor my “hello world” basic CGI script worked.

One of the help documents said that Deluxe hosting and up has Python 2.7.2 support, but that cPanel accounts don’t support Python 2.7. Since I have deluxe hosting with cPanel, I just wanted to make sure that I have Python support. If so, any recommendations on troubleshooting?

Thanks in advance.

3 REPLIES 3

Re: Am getting Python/CGI errors; does cPanel support?

Problem solved. In case anyone finds this thread later, here's the guide to installing Python 3 on GoDaddy:

https://www.godaddy.com/garage/how-to-install-and-configure-python-on-a-hosted-server/

 

Also, here's the guide to using the SSH terminal:

https://www.godaddy.com/help/connect-to-your-server-or-shared-hosting-account-with-ssh-4943

 

also worth noting that if you follow the above instructions, your python directory will be 

/home/*your cPanel username*/.local/bin/Python3.

Re: Am getting Python/CGI errors; does cPanel support?

Hello, I am having a similar problem to you. My cgi script worked when the shebang (#!/usr/bin/env python) pointed to the default python installation for the system (2.6 in my case). However, I needed python3 to use an sdk, so I followed the same tutorial as you with success (python 3.6.8). The problem is that I can seem to figure out what shebang will point to python3. this is what I get for 

[~]$ which python 3
[~]$ /home/tv6iv5xm1fm8/.local/bin/python3

 With the shebang

#!/home/tv6iv5xm1fm8/.local/bin/python3

I get a 500 status response. 

 

You said you got yours to work??

New

Re: Am getting Python/CGI errors; does cPanel support?

Hi all - 

 

Having the same issue as prior post (e.g., 500 error with shebang pointing to new python3 installation). Tried numerous things...to no avail. Any solution identified?