Answer the question
In order to leave comments, you need to log in
How can i run python script on vps?
How can i run python script on vps?
Answer the question
In order to leave comments, you need to log in
0. Get SSH access and connect.
1. Install the required version of python if it is not installed. If it is available in the repository, then use yum or apt-get, depending on which linux distribution is installed on your VPS.
2. Using this version of python, run pip (python3 m -pip ......... ) to install the required packages.
3. Run the script using this version of python (you may have to specify the full path to the python executable).
4. If you want the script to run when the VPS is restarted and run in the background, create a script or a systemd module (depending on the distribution) following the init.d model, placing the launch command in it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question