I recently have a website running a python script. Unfortunately, this python script requires another python module but I do not know how to install it on the website. How do you install a python module for a website. Below is my code
<?php $VAR = 'test'; $output = shell_exec('python test.py ' . $VAR); //$output = shell_exec('python -m pip install requests'); <-- tried that but does not work. echo $output; ?>
import requests response = requests.get('google.com') print (response.text)
I do not get anything when I go to my php page, but if I hastag import requests and response and print and just put "print ("Hi")" it works. Any ideas on how to install requests?
Is there anyway I can get a shell for a website?
NOTE: I AM USING CPANEL.